DocumentLab-x64
1.3.0
Requires NuGet 4.7.0.0 or higher.
dotnet add package DocumentLab-x64 --version 1.3.0
NuGet\Install-Package DocumentLab-x64 -Version 1.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DocumentLab-x64" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DocumentLab-x64 --version 1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DocumentLab-x64, 1.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DocumentLab-x64 as a Cake Addin #addin nuget:?package=DocumentLab-x64&version=1.3.0 // Install DocumentLab-x64 as a Cake Tool #tool nuget:?package=DocumentLab-x64&version=1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Getting started
You can write scripts in the query language or use the C# API. The C# fluent interface is easier to get started quickly. The raw text scripting interface allows more versatility and configurability in a production context.
Definitions
- Pattern: A description of how information is presented in a document as well as which data to capture
- e.g:
Text(Total amount) Right [Amount]
- e.g:
- Table: A description of which table column labels to match in a document and which text types are represented in each column
- e.g:
Table 'ItemNo': [Number(Item number)] 'Description': [Text(Description)] 'Price': [Amount(...
- e.g:
- Query: A named set of patterns prioritized first to last
- e.g:
IncoiceNumber: *pattern 1*; *pattern 2*; ... *pattern n*;
- e.g:
- Script: A collection of queries to execute in one go. Output properties will have the query name
From here...
Quick examples
Below are a few select examples with comments on how DocumentLab can be used.
C# Fluent Query Example
using (var dl = new Document((Bitmap)Image.FromFile("pathToSomeImage.png")))
{
// Here we ask DocumentLab to specifically find a date value for the specified possible labels
string dueDate = dl.Query().FindValueForLabel(TextType.Date, "Due date", "Payment date");
// Here we ask DocumentLab to specifically find a date value for the specified label in a specific direction
string customerNumber = dl.Query().GetValueForLabel(Direction.Right, "Customer number");
// We can build patterns using predicates, directions and capture operations that return the value matched in the document
// Patterns allow us to recognize and capture data by contextual information, i.e., how we'd read for example receiver information from an invoice
string receiverName = dl
.Query()
.Match("PostCode") // Text classification using contextual data files can be referenced by string
.Up()
.Match("Town")
.Up()
.Match("City")
.Up()
.Capture(TextType.Text); // All text type operations can also use the statically defined text type enum
}
Script example
- Your document has a label "Customer number:" and a value to the right of it
- Query:
CustomerNumber: Text(Customer number) Right [Text];
- Match text labels with implicit starts with and Levensthein distance 2 comparison
- Query:
- Your document has a label "Invoice date" and a date below it
- Query:
InvoiceDate: Text(Invoice date) Down [Date];
- You can capture a variety of text types. Even if the document contains additional text at the capture you'll only get back a standardized ISO date.
- Query:
- Want to capture invoice receiver info in one query?
- Query:
Receiver: 'Name': [Text] Down 'Address': [StreetAddress] Down 'City': [Town] Down 'PostalCode': [PostalCode];
- Json output will name properties according to the query predicate naming parameters
- Query:
- You want to capture all amounts in a document?
- Query:
AllAmounts: Any [Amount];
- When we use any, results are returned in a json array
- Query:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- Antlr4.Runtime (>= 4.6.6)
- AutoCache.Lib (>= 1.1.1)
- Baseclass.Contrib.Nuget.Output (>= 2.4.3)
- Castle.Core (>= 4.3.1)
- Castle.Windsor (>= 4.1.0)
- EmguCV (>= 3.1.0.1)
- Magick.NET-Q8-x64 (>= 7.5.0.1)
- Microsoft.Net.Compilers (>= 3.4.0)
- Newtonsoft.Json (>= 11.0.2)
- OpenCvSharp3-AnyCPU (>= 3.4.1.20181108)
- OpenTK (>= 1.1.2225)
- OpenTK.GLControl (>= 1.1.2225)
- System.ValueTuple (>= 4.4.0)
- Tesseract (>= 3.3.0)
- ZedGraph (>= 5.1.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.