Kumo 0.3.0
See the version list below for details.
dotnet add package Kumo --version 0.3.0
NuGet\Install-Package Kumo -Version 0.3.0
<PackageReference Include="Kumo" Version="0.3.0" />
paket add Kumo --version 0.3.0
#r "nuget: Kumo, 0.3.0"
// Install Kumo as a Cake Addin
#addin nuget:?package=Kumo&version=0.3.0
// Install Kumo as a Cake Tool
#tool nuget:?package=Kumo&version=0.3.0
Kumo
Enriching Microsoft Word documents with semantic annotations.
What is Kumo?
Kumo is a semantic annotation library that enables the user to easily specify relationships between text fragments within a document and places, concepts, people, dates and other things that may be stored in an ontology. This is accomplished by providing a simple way to create a relationship and apply it to one or more text fragments within the document.
Getting started
The library is available at NuGet: https://www.nuget.org/packages/Kumo/
To get the latest version of the library, clone this repository and reference the project under src/Kumo in your solution.
Examples
Please note that the library is work in progress.
Some features are yet to be implemented, while others may contain major bugs.
The library API is still subject to change.
The examples here demonstrate some of the basic functionality.
The following code snippet opens a document and retrieves a text fragment.
using System;
using Kumo;
using (var d = Document.Open("path/to/document.docx"))
{
var text = d.Range(0, 42).Text();
Console.WriteLine(text);
}
To annotate a text fragment, one must create a Property object which represents an edge with node connected to it in a semantic net.
using System;
using Kumo;
using (var d = Document.Open("path/to/document.docx"))
{
var range = d.Range(0, 42);
// The strings used to create a Property must be valid URIs.
var property = new Property(
"http://example.org/predicate",
"http://example.org/value"
);
// Annotate the text fragment with this property.
range.Attach(property);
}
Accessing all annotated text fragments within a document is simple.
using System;
using Kumo;
using (var d = Document.Open("path/to/document.docx"))
{
// Yes, they are called stars.
var stars = d.Stars();
foreach (var s in stars)
{
Console.WriteLine(s.Text());
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. 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. |
-
net5.0
- DocumentFormat.OpenXml (>= 2.12.3)
- dotNetRDF (>= 2.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.3.1 | 355 | 6/16/2021 |
0.3.0 | 283 | 6/16/2021 |
0.2.0-alpha-with-xml-docs | 202 | 4/21/2021 |
0.2.0-alpha | 201 | 4/21/2021 |
This version includes the following additions:
- raw RDF data stored in the document is now accessible through RdfStream
method of the Document class;
- properties can be detached from ranges by calling the Detach method of the
Range class;
- the document and ranges are now assigned a URI that can be accessed
using the Uri properties of Document and Range classes respectively;
Note that accessing range or document URIs for documents
not previously edited with the library requires the documents
to be opened with editable flag set to true.
This will be fixed in the next version.