indicoio-csharp
0.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package indicoio-csharp --version 0.1.0
NuGet\Install-Package indicoio-csharp -Version 0.1.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="indicoio-csharp" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add indicoio-csharp --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: indicoio-csharp, 0.1.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 indicoio-csharp as a Cake Addin
#addin nuget:?package=indicoio-csharp&version=0.1.0
// Install indicoio-csharp as a Cake Tool
#tool nuget:?package=indicoio-csharp&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
IndicoIo-CSharp
A C# wrapper for the indico API.
Full Documentation + API Keys + Setup
For API key registration and setup and docs, checkout our quickstart guide.
Supported APIs:
- Pretrained
- Sentiment
- Text Tags
- Language
- People
- Places
- Organizations
- Image Features
- Content Filtering
- PDF Extraction
- Custom Collection Operations
Pretrained Examples
var sdk = new Indico("__YOUR_API_KEY__");
// Sentiment
float sentimentResult = await sdk.pretrained.Sentiment("I love writing code!");
// Text Tags
Dictionary<string, float> textTags = await sdk.pretrained.TextTags("The most common form of arrow consists of a shaft with an arrowhead attached to the front end and with fletchings and a nock attached to the other end.");
// Language
Dictionary<string, float> languageResults = await sdk.pretrained.Language("Warrom ging je naar het park?");
// People
List<Person> peopleResults = await sdk.pretrained.People("London Underground's boss Mike Brown warned that the strike ...");
// Places
List<Place> placeResults = await sdk.pretrained.Places("I can't wait to see all of Europe. In particular I want to see the Eifle Tower and the roman Colleseum!");
// Organizations
List<Organization> orgResults = await sdk.pretrained.Organizations("London Underground's boss Mike Brown warned that the strike ...");
// Image Features
string base64Image = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA...";
List<float> ifResults = await sdk.pretrained.ImageFeatures(base64Image);
// Content Filtering
string base64Image = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA...";
float cfResults = await sdk.pretrained.ContentFiltering(base64Image);
Pretrained Examples
var sdk = new Indico("__YOUR_API_KEY__");
// Intitiate Extraction
string jobID = await sdk.pdfExtraction.StartExtraction(pdfContents, true, true, true, true); // Base64 Encoded Document, Use OCR, Return page text, Return document metadata, Return tables
// Check on Job Status
AsyncJobStatus jobStatus = await sdk.pdfExtraction.GetExtractionStatus(jobID);
// When job is complete and successful, retrieve the extracted contents
if (jobStatus == AsyncJobStatus.Success) {
ExtractedPDF contents = await sdk.pdfExtraction.GetExtractedDocument(jobID);
}
Custom Collection Examples
var sdk = new Indico("__YOUR_API_KEY__", "https://apiv2.indico.io/");
string CollectionName = "My_Custom_Collection";
// List Custom Collections
List<CustomCollection> results = await sdk.custom.ListAll();
// Get Collection information
CustomCollection response = await sdk.custom.Info(CollectionName);
// Add Data - Classification Models
List<CollectionData> labels = new List<CollectionData>()
{
new CollectionData("This might be the best movie ever!", "Label A"),
new CollectionData("The characters in this movie are incredibly weak", "Label B"),
};
bool addSuccess = await sdk.custom.AddData(CollectionName, labels);
// Add Data - Annotation Models
var example1 = new CollectionData("Eastman Kodak Co is raising 25 mln dlrs through an offering of notes due 1997, said sole underwriter Morgan Stanley and Co Inc...",
new AnnotationData[2] {
new AnnotationData(0, 16, "label-1"),
new AnnotationData(101, 127, "label-2")
});
List <CollectionData> annotationLabels = new List<CollectionData>() { example1 };
bool addSuccess = await sdk.custom.AddData(CollectionName, annotationLabels);
// Remove Data from Collection
string[] removeExamples = new string[2] { "This might be the best movie ever!", "The characters in this movie are incredibly weak" };
bool removeSuccess = await sdk.custom.RemoveData(CollectionName, removeExamples);
// Train Collection
CustomCollection response = await sdk.custom.Train(CollectionName);
// Predict Classification
string singleSample = "This film is the work of one of the finest filmmakers of any generation.";
Dictionary<string, float> response = await sdk.custom.PredictClassification(collectionName, singleSample);
string[] batchSample = new string[2] { "This film is the work of one of the finest filmmakers of any generation.", "I think it's going to be a flop!" }
List<Dictionary<string, float>> response = await sdk.custom.PredictClassification(collectionName, batchSample);
// Predict Annotation
string singleAnnoExample = "How much wood could a woodchuck chuck?";
List<AnnotationPrediction> response = await sdk.custom.PredictAnnotation(annotationCollectionName, singleAnnoExample);
string[] batchAnnoExample = new string[2] { "How much wood could a woodchuck chuck?", "If a woodchuck could chuck wood?" };
List<List<AnnotationPrediction>> response = await sdk.custom.PredictAnnotation(annotationCollectionName, batchAnnoExample);
// Sharing a collection
bool isPublic = true;
bool registerSuccess = await sdk.custom.Register(collectionName, isPublic);
bool deRegisterSuccess = await sdk.custom.DeRegister(collectionName);
// Authorizing users on a shared collection
bool authorizeSuccess = await sdk.custom.AuthorizeUser(collectionName, "contact@indico.io", CollectionPermission.Write);
bool deauthorizeSuccess = await sdk.custom.DeAuthorizeUser(collectionName, "contact@indico.io");
// Removing a collection
bool deleteSuccess = await sdk.custom.Delete(createDeleteCollectionName);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- NewtonSoft.Json (>= 12.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.