|
|
| Line 1: |
Line 1: |
| | {|class="wip-box" |
| | | |
| | '''WIP''' |
| | | |
| | This article is a work-in-progress or created as a placeholder for testing purposes. This article is subject to change and/or expansion. It may be incomplete, inaccurate, or stop abruptly. |
| | |
| | This tag will be removed upon draft completion. |
| | |} |
| | |
| <blockquote style="font-size:125%"> | | <blockquote style="font-size:125%"> |
| '''''Fluid Layout''''' is one of Grooper's methods of extracting table data from documents available to '''Data Table''' objects (via the '''''Extract Method''''' property). This table extraction method will alternate between '''''Tabular Layout''''' and '''''Flow Layout''''' configurations from one '''Document Type''' to the next, depending on how labels are collected for the '''Document Type'''. | | '''''Fluid Layout''''' is one of Grooper's methods of extracting table data from documents available to '''Data Table''' objects (via the '''''Extract Method''''' property). This table extraction method will alternate between '''''Tabular Layout''''' and '''''Flow Layout''''' configurations from one '''Document Type''' to the next, depending on how labels are collected for the '''Document Type'''. |
| Line 15: |
Line 24: |
| |} | | |} |
|
| |
|
| The '''''Fluid Layout''''' table extraction method is designed to switch between the '''''Tabular Layout''''' method and the '''''Row Match''''' method, depending on how a '''Data Table's''' labels are configured. So, if you have a varied set of documents where '''''Tabular Layout''''' works well for some '''Document Types''' and '''''Row Match''''' works well for other '''Document Types''', you may be able to use '''''Fluid Layout''''' for all of them, avoiding the need for Data Element Overrides.
| | {{#lst:Labeling Behavior - 2023|Fluid Layout}} |
| | |
| {|cellpadding="10" cellspacing="5" | |
| |-style="background-color:#f89420; color:white"
| |
| |style="font-size:22pt"|'''⚠'''||Label Sets ''must'' be collected to use the '''''Fluid Layout''''' method. Each '''Document Type''' will use either '''''Tabular Layout''''' or a '''''Row Extractor''''' to collect table data depending on how the labels for a '''Data Table''' are collected. Therefore, you ''cannot'' utilize the '''''Fluid Layout''''' method without a '''''Labeling Behavior''''' enabled.
| |
| | |
| The '''''Fluid Layout''''' table extraction method is not only "Label Set aware", it is Label Set '''''dependent'''''.
| |
| |}
| |
| | |
| {|cellpadding=10 cellspacing=5
| |
| |valign=top style="width:40%"|
| |
| For example, take these two versions of code descriptions from an EOB form.
| |
| | |
| Version 1 is clearly a table. It uses the labels "CODE" and "DESCRIPTION" to delineate between each column. The '''''Tabular Layout''''' table extraction method would handily extract this information, returning everything in the "CODE" column to one '''Data Column''' and everything in the "DESCRIPTION" column to another..
| |
| |valign=top|
| |
| [[File:Labeling-behavior-fluid-layout-about-01.png]]
| |
| |-
| |
| |valign=top|
| |
| Version 2 is not exactly a table, but a '''Data Table''' could still use the '''''Row Extract''''' method to form a table from this list of information. Each bulleted item in the list could be returned as a table row. The code could be filtered into one '''Data Column''' and the description could be filtered into another.
| |
| | |
| You could ''not'' use the '''''Tabular Layout''''' method for this "table". There are no column labels present.
| |
| * There is, however, a header label for the whole table "Code", which will be important for the '''''Fluid Layout''''' method.
| |
| |valign=top|
| |
| [[File:Labeling-behavior-fluid-layout-about-02.png]]
| |
| |}
| |
| | |
| So, we have a situation where the '''''Tabular Layout''''' ''or'' the '''''Row Match''''' method is preferable, depending on the document's layout. Next, we will review how to configure the '''''Fluid Layout''''' table extraction method to target both table structures.
| |
| | |
| <span id="The Fluid Layout Method Anchor"></span>
| |
| <tabs style="margin:20px">
| |
| <tab name="Collect Labels" style="margin:20px">
| |
| === Collect Labels ===
| |
| | |
| The first thing you will want to do is collect labels for your '''Data Table''' for each document type. How the labels are collected will determine which table extraction method the '''''Fluid Layout''''' method executes.
| |
| * To execute the '''''Tabular Layout''''' method, the '''Data Table's''' '''Data Column''' '''''Header''''' labels ''must'' be collected.
| |
| ** Optionally, you may choose to collect a '''''Header''''' and/or '''''Footer''''' label for the '''Data Table'''.
| |
| * To execute the '''''Row Match''''' method (also referred to as the '''''Flow Layout'''''), you ''must'' collect the '''Data Table's''' '''''Header''''' label. You may NOT collect labels for the '''Data Table's''' '''Data Column''' labels.
| |
| ** This will be how Grooper checks to see which extraction method is used for each '''Document Type'''. If '''Data Column''' labels are present, the '''''Tabular Layout''''' configuration is used. If no '''Data Column''' labels are present, ''but'' the '''Data Table's''' '''''Header''''' label is present, it will use the '''''Flow Layout''''' (i.e. '''''Row Match''''') configuration is used.
| |
| ** Optionally, you may choose to collect a '''''Footer''''' label for the '''Data Table'''.
| |
| | |
| {|cellpadding=10 cellspacing=5
| |
| |valign=top style="width:40%"|
| |
| # We will use this '''Content Model''' named "The Fluid Layout Method - Model" for this exercise.
| |
| #* Its '''''Labeling Behavior''''' has already been enabled.
| |
| # We have navigated to the "Labels" tab to start collecting labels.
| |
| # We have selected this '''Batch''' named "The Fluid Layout - Test Batch".
| |
| # Notice we have two '''Document Types'''
| |
| #* "V1 - Tabular Layout" will correspond to the document whose code description is in a proper table with column headers for the "CODE" and "DESCRIPTION" columns.
| |
| #* "V2 - Row Match" will correspond to the document whose code description is in a bulleted list.
| |
| # The two document folders in the '''Batch''' have already been assigned the appropriate '''Document Type'''.
| |
| |valign=top|
| |
| [[File:Labeling-behavior-fluid-layout-how-to-01.png]]
| |
| |}
| |
| </tab>
| |
| <tab name="For Tabular Layout Document Types" style="margin:20px>
| |
| === For Tabular Layout Document Types ===
| |
| | |
| The "V1" '''Document Type''' will utilize the '''''Fluid Layout''''' method's '''''Tabular Layout''''' configuration. To execute the '''''Tabular Layout''''' configuration, much like executing the '''''Tabular Layout''''' table extraction method in general, '''Data Column''' labels must be collected.
| |
| | |
| {|cellpadding=10 cellspacing=5
| |
| |valign=top style="width:40%"|
| |
| # We have selected the "V1 - Tabular Layout" document folder in the '''Batch'''.
| |
| # The '''''Header''''' labels for the "Code" and "Description" '''Data Columns''' have been collected.
| |
| #* <code>CODE</code> for the "Code" '''Data Column'''
| |
| #* <code>DESCRIPTION</code> for the "Description" '''Data Column'''
| |
| |
| |
| [[File:Labeling-behavior-fluid-layout-how-to-02.png]]
| |
| |-
| |
| |valign=top|
| |
| {|cellpadding="10" cellspacing="5"
| |
| |-style="background-color:#36b0a7; color:white"
| |
| |style="font-size:14pt"|'''FYI'''
| |
| |
| |
| Just as is the case with the '''''Tabular Layout''''' table extraction method as a "stand alone" extraction method, when used with '''''Fluid Layout''''', collecting a '''Data Table's''' '''''Header''''' label is optional.
| |
| | |
| That said, it is still generally considered best practice to collect a row of header labels using the '''Data Table's''' '''''Header''''' label, if possible.
| |
| | |
| # Here, we've collected a '''''Header''''' Label for the "Code Remarks" '''Data Table'''.
| |
| |}
| |
| |valign=top|
| |
| [[File:Labeling-behavior-fluid-layout-how-to-03.png]]
| |
| |}
| |
| | |
| </tab>
| |
| <tab name="For Flow Layout (Row Match) Document Types" style="margin:20px">
| |
| === For Flow Layout Document Types ===
| |
| | |
| The "V2" '''Document Type''' will utilize the '''''Fluid Layout''''' method's '''''Flow Layout''''' configuration. This will utilize the '''''Row Match''''' method to return table data. To execute the '''''Flow Layout''''' configuration ONLY the '''Data Table's''' label must be collected.
| |
| | |
| {|cellpadding=10 cellspacing=5
| |
| |valign=top style="width:40%"|
| |
| # We have selected the "V2 - Row Match" document folder in the '''Batch'''.
| |
| # The '''''Header''''' label for the "Code Remarks" '''Data Table''' has been collected.
| |
| # DO NOT collect '''Data Column''' labels for '''Document Types''' you wish to utilize the '''''Row Match''''' method to collect data.
| |
| |
| |
| [[File:Labeling-behavior-fluid-layout-how-to-04.png]]
| |
| |}
| |
| </tab>
| |
| <tab name="Configure Fluid Layout" style="margin:20px">
| |
| === Configure Fluid Layout ===
| |
| | |
| {|cellpadding=10 cellspacing=5
| |
| |valign=top style="width:40%"|
| |
| Now that the labels are collected for our '''Document Types''' we can configure the '''''Fluid Layout''''' extraction method for our '''Data Table'''.
| |
| | |
| # Select the '''Data Table''' in the Node Tree Viewer.
| |
| #* We've selected our "Code Remarks" '''Data Table'''.
| |
| # Select the '''''Extract Method''''' property.
| |
| # Using the dropdown menu, select ''Fluid Layout''.
| |
| |valign=top|
| |
| [[File:Labeling-behavior-fluid-layout-how-to-05.png]]
| |
| |-
| |
| |valign=top|
| |
| Expanding the '''''Fluid Layout''''' sub-properties, you can see there are two '''''Layout''''' configurations.
| |
| | |
| # The '''''Tabular Layout''''' configuration will be applied to '''Document Types''' whose '''Data Column''' labels have been collected.
| |
| # The '''''Flow Layout''''' configuration will be applied to '''Document Types''' whose '''Data Column''' labels have NOT been collected, as long as the '''Data Table's''' '''''Header''''' label is present.
| |
| |
| |
| [[File:Labeling-behavior-fluid-layout-how-to-08.png]]
| |
| |-
| |
| |valign=top|
| |
| By expanding the '''''Tabular Layout''''' and '''''Flow Layout''''' properties, you can see their property panels are identical to the '''''Tabular Layout''''' and '''''Row Match''''' table extraction methods respectively.
| |
| | |
| # The properties you see here are the same set of properties you configure for the '''''Tabular Layout''''' method.
| |
| # The properties you see here are the same set of properties you configure for the '''''Row Match''''' method.
| |
| | |
| All that's left is to configure extraction logic for each of the '''''Layouts'''''.
| |
| |valign=top|
| |
| [[File:Labeling-behavior-fluid-layout-how-to-06.png]]
| |
| |}
| |
| | |
| === Configure Flow Layout ===
| |
| | |
| {|cellpadding=10 cellspacing=5
| |
| |valign=top style="width:40%"|
| |
| The '''''Flow Layout''''' configuration extracts table data using the '''''Row Match''''' method. What do you need in order for '''''Row Match''''' to collect table data? A '''''Row Extractor'''''.
| |
| | |
| # In our Local Resources folder, we already have a '''Data Type''' that will return rows properly for our "V2" '''Document Type'''.
| |
| # Using the '''''Row Extractor''''' property, we've referenced the aforementioned '''Data Type'''.
| |
| | |
| For our purposes, that's all we need to do. For the "V2 - Row Match" '''Document Types''' this extractor will properly return each row and collect each columns data. We have no need to configure any of the other '''''Row Match''''' properties.
| |
| |valign=top|
| |
| [[File:Labeling-behavior-fluid-layout-how-to-07.png]]
| |
| |}
| |
| | |
| === Configure Tabular Layout ===
| |
| | |
| {|cellpadding=10 cellspacing=5
| |
| |valign=top style="width:40%"|
| |
| The '''''Tabular Layout''''' configuration extracts table data using the '''''Tabular Layout''''' method. What do you need in order for '''''Tabular Layout''''' to collect table data? At least one '''Data Column's''' '''''Value Extractor''''' must be configured in order to detect each row in the table.
| |
| | |
| # We've selected the "Code" '''Data Column''' to configure.
| |
| # For its '''''Value Extractor''''' we've used a '''''Pattern Match''''' extractor.
| |
| # The '''''Pattern Match''''' extractor's '''''Value Pattern''''' is set to the regex <code>\w+</code> and its '''''Prefix Pattern''''' is set to the regex <code>\n</code>.
| |
| # This will return one result for each row of the "CODE" column, effectively detecting all four rows present.
| |
| | |
| This is a fairly simple table with only two columns. Just configuring one '''Data Column's''' '''''Value Extractor''''' will be sufficient for our needs.
| |
| |valign=top|
| |
| [[File:Labeling-behavior-fluid-layout-how-to-09.png]]
| |
| |-
| |
| |valign=top|
| |
| # If you need to configure any additional '''''Tabular Layout''''' settings, you can do so by selecting the '''Data Table''' in the Node Tree Viewer.
| |
| # Expand out the '''''Tabular Layout''''' properties and configure them as needed.
| |
| #* Again, this is a simple table with simple configuration needs. These default property configurations should be adequate to collect table data for the "V1 - Tabular Layout" '''Document Types'''.
| |
| |valign=top|
| |
| [[File:Labeling-behavior-fluid-layout-how-to-10.png]]
| |
| |}
| |
| </tab>
| |
| <tab name="Test Extraction" style="margin:20px">
| |
| === Test Extraction ===
| |
| | |
| Now that extraction is configured for both the ''''''Tabular Layout''''' and '''''Flow Layout''''' for our documents, Grooper will switch between the '''''Tabular Layout''''' table extraction method and the '''''Row Match''''' table extraction methods, depending on the '''Document Type'''.
| |
| | |
| {|cellpadding=10 cellspacing=5
| |
| |valign=top style="width:40%"|
| |
| For the "V1 - Tabular Layout" '''Document Type''', '''Data Column''' labels were collected.
| |
| | |
| Therefore Grooper extracts the table using the '''''Tabular Layout''''' configuration.
| |
| |valign=top|
| |
| [[File:Labeling-behavior-fluid-layout-how-to-11.png]]
| |
| |-
| |
| |valign=top|
| |
| For the "V2 - Row Match" '''Document Type''', only the '''Data Table's''' '''''Header''''' label was collected, and ''no'' '''Data Column''' labels were collected.
| |
| | |
| Therefore, Grooper extracts the table using the '''''Flow Layout''''' configuration (using the '''''Row Match''''' method).
| |
| |valign=top|
| |
| [[File:Labeling-behavior-fluid-layout-how-to-12.png]]
| |
| |}
| |
| </tab>
| |
| :[[#The Fluid Layout Method Anchor|Click me to return to the top]]
| |
| </tabs>
| |
| | |
| [[Category:Articles]]
| |
| [[Category:Version 2021]]
| |