Conllu 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Conllu --version 1.0.0
NuGet\Install-Package Conllu -Version 1.0.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="Conllu" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Conllu --version 1.0.0
#r "nuget: Conllu, 1.0.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 Conllu as a Cake Addin
#addin nuget:?package=Conllu&version=1.0.0

// Install Conllu as a Cake Tool
#tool nuget:?package=Conllu&version=1.0.0

CoNLL-U Parser in .NET Core

.NET Core

This repository contains a lightweight, well-tested CoNLL-U parser written in C# .NET Core and parses according to the CoNLL-U format as specified by Universal Dependencies.

Quick Start

CoNLL-U is available as a NuGet package. Once installed, you can start as follows:

var filePath = ...
var sentences = ConlluParser.ParseFile(filePath);

Each Sentence contains a list of Token which contain all the information as specified in the CoNLL-U format. Below is a short overview of some of the fields that are available in the Token class:

   public class Token
   {
        // CoNLL-U Properties
        int Id;
        string Form;
        string Lemma;
        string Upos;
        string Xpos;
        Dictionary<string, string> Feats;
        int? Head;
        string DepRel;
        Dictionary<TokenIdentifier, string> Deps;
        string Misc;
        
        // Other properties
        TokenIdentifier Identifier;
        string RawLine;
        bool IsMultiwordToken;
        bool IsEmptyNode;
   }

In addition, there is a TokenIdentifier class which wraps the different possibilities for word ID such as multiword tokens or empty nodes.

To-do

  • Support empty nodes
  • Add tree parsing helper functions
  • Add serialization support to generate .conllu files

License

Copyright (c) 2021 Arthur Hemmer

Distributed under the MIT License (MIT).

Product 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 netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Conllu:

Package Downloads
Chiron.Nlp

Chiron NLP-related components

Fusi.UDPipe

Minimalist API surface for https://github.com/ufal/udpipe.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1 5,114 11/1/2021
1.1.0 478 1/31/2021
1.0.2 319 1/17/2021
1.0.1 340 1/10/2021
1.0.0 326 1/9/2021