Skip to content
A client Api for classifying content using the Smartlogic Semaphore suite of products and the Microsoft .Net Framework
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

VSO build status

Smartlogic Semaphore .Net Client Api

Install from NuGet

Although you can certainly clone this repo and build your own binaries, it's also possible to use a pre-compiled version from NuGet by following these steps:

  1. In Visual Studio, from the Tools menu select Library Package Manager and then click Package Manager Console.

  2. In the Package Manager Console window that is displayed simply type:

install-package Smartlogic.Semaphore.Api

and you're done!

For more info see Smartlogic.Semaphore.Api on NuGet

An example Console Application that classifies a document using C#

using System;
using System.Collections.Generic;
using System.IO;
using Smartlogic.Semaphore.Api;

namespace APIDemo
    internal class Program
        private static void Main(string[] args)
            var client = new ClassificationServer(new Uri("http://your-classification-server-url"));

            var doc = File.ReadAllBytes(@"C:\path\to\somedocument.pdf");

            var options = new ClassificationOptions
                Threshold = 10

            var metadata = new Dictionary<string, string>();

            var result = client.Classify("My File", doc, "filename.pdf", metadata, "", options);

            var classifications = result.GetClassifications();

            foreach (var item in classifications)
                Console.WriteLine($"{item.ClassName}    {item.Id}   {item.Score}    {item.Value}");

You can’t perform that action at this time.