Lucidtech.Las 0.2.0

SDK for accessing Lucidtech AI Services

There is a newer version of this package available.
See the version list below for details.
Install-Package Lucidtech.Las -Version 0.2.0
dotnet add package Lucidtech.Las --version 0.2.0
<PackageReference Include="Lucidtech.Las" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Lucidtech.Las --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

.NET SDK for Lucidtech AI Services

Documentation

Link to docs

Create documents by using doxygen.
Download the latest and greatest version of doxygen.

$ doxygen documentation.conf

Installation

NuGet

$ nuget install Lucidtech.Las

Usage

Preconditions

  • Documents must be in upright position
  • Only one receipt or invoice per document is supported
  • Supported file formats are: jpeg, pdf
  • Necessary keys and credentials to an endpoint on the form: "https://<your prefix>.api.lucidtech.ai/<version>".

Quick start

Run inference and create prediction on document

using Lucidtech.Las;

ApiClient apiClient = new ApiClient("<endpoint>");
Prediction response = apiClient.Predict(documentPath: "document.pdf", modelName: "invoice|receipt|documentSplit");
Console.WriteLine(response.ToJsonString(Formatting.Indented));

Send feedback to the model.

using Lucidtech.Las;

var feedback = new List<Dictionary<string, string>>()
{ 
    new Dictionary<string, string>(){{"label", "total_amount"},{"value", "54.50"}},
    new Dictionary<string, string>(){{"label", "purchase_date"},{"value", "2007-07-30"}}
};
FeedbackResponse response = apiClient.SendFeedback(documentId: "<documentId>", feedback: feedback);
Console.WriteLine(response.ToJsonString(Formatting.Indented));

Revoke consent and deleting all documents associated with consentId.

using Lucidtech.Las;

ApiClient apiClient = new ApiClient("<endpoint>");
RevokeResponse response = apiClient.RevokeConsent(consentId: "<consentId>");
Console.WriteLine(response.ToJsonString(Formatting.Indented));

Contributing

Prerequisites

Download the following packages:

  • The latest and greatest stable version of MSBuild
  • The latest and greatest version of NuGet
  • nunit version 3.9.0 or higher to run tests from command line
  • .NET-SDK version 2.2.105

Prerequisites for Arch Users

Download the following packages:

  • The latest and greatest stable version of MSBuild
  • The latest and greatest version of NuGet
  • nunit version 3.9.0 or higher to run tests from command line
  • .NET-SDK version 2.2.105

Build and run tests

Clone repo and install the necessary packages manually for the las-sdk-net.

$ git clone git@github.com:LucidtechAI/las-sdk-net.git
$ cd las-sdk-net
$ dotnet restore Test # Restore nuget packages dependencies
$ msbuild Test/Test.csproj # Build Tests
$ nunit3-console Test/bin/Debug/<framework-version>/Test.dll # Run
$ # Build for release and make nuget package
$ msbuild Lucidtech/Lucidtech.csproj /t:Rebuild /p:Configuration=Release

.NET SDK for Lucidtech AI Services

Documentation

Link to docs

Create documents by using doxygen.
Download the latest and greatest version of doxygen.

$ doxygen documentation.conf

Installation

NuGet

$ nuget install Lucidtech.Las

Usage

Preconditions

  • Documents must be in upright position
  • Only one receipt or invoice per document is supported
  • Supported file formats are: jpeg, pdf
  • Necessary keys and credentials to an endpoint on the form: "https://<your prefix>.api.lucidtech.ai/<version>".

Quick start

Run inference and create prediction on document

using Lucidtech.Las;

ApiClient apiClient = new ApiClient("<endpoint>");
Prediction response = apiClient.Predict(documentPath: "document.pdf", modelName: "invoice|receipt|documentSplit");
Console.WriteLine(response.ToJsonString(Formatting.Indented));

Send feedback to the model.

using Lucidtech.Las;

var feedback = new List<Dictionary<string, string>>()
{ 
    new Dictionary<string, string>(){{"label", "total_amount"},{"value", "54.50"}},
    new Dictionary<string, string>(){{"label", "purchase_date"},{"value", "2007-07-30"}}
};
FeedbackResponse response = apiClient.SendFeedback(documentId: "<documentId>", feedback: feedback);
Console.WriteLine(response.ToJsonString(Formatting.Indented));

Revoke consent and deleting all documents associated with consentId.

using Lucidtech.Las;

ApiClient apiClient = new ApiClient("<endpoint>");
RevokeResponse response = apiClient.RevokeConsent(consentId: "<consentId>");
Console.WriteLine(response.ToJsonString(Formatting.Indented));

Contributing

Prerequisites

Download the following packages:

  • The latest and greatest stable version of MSBuild
  • The latest and greatest version of NuGet
  • nunit version 3.9.0 or higher to run tests from command line
  • .NET-SDK version 2.2.105

Prerequisites for Arch Users

Download the following packages:

  • The latest and greatest stable version of MSBuild
  • The latest and greatest version of NuGet
  • nunit version 3.9.0 or higher to run tests from command line
  • .NET-SDK version 2.2.105

Build and run tests

Clone repo and install the necessary packages manually for the las-sdk-net.

$ git clone git@github.com:LucidtechAI/las-sdk-net.git
$ cd las-sdk-net
$ dotnet restore Test # Restore nuget packages dependencies
$ msbuild Test/Test.csproj # Build Tests
$ nunit3-console Test/bin/Debug/<framework-version>/Test.dll # Run
$ # Build for release and make nuget package
$ msbuild Lucidtech/Lucidtech.csproj /t:Rebuild /p:Configuration=Release

Release Notes

Updated the SDK to support the latest Lucidtech API, support maxPages and autoRotate flags.
       Uses Oauth2 authorization

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.2.1 84 5/18/2020
0.2.0 172 2/6/2020
0.1.5 119 1/30/2020
0.1.4 166 5/24/2019
0.1.3 195 4/12/2019
0.1.2 175 3/26/2019
0.1.1 175 3/22/2019