GithubHelp home page GithubHelp logo

sharpsimplenlg's Introduction

SharpSimpleNLG

SharpSimpleNLG is a C# port of the University of Aberdeen simplenlg project. All thanks and acknowledgement for hard work goes to this team.

NuGet

SharpSimpleNLG

Install-Package SharpSimpleNLG

Version News

Version 1.1.1:

  • Thanks to PR from Andriy Svyrd now supports .NET Standard 1.3. Added to NuGet package (I hope my packaging is OK!)
  • Renaming .csproj to ensure naming of assemblies is OK
  • Move all extension methods (on Enums, mainly) into the SimpleNLG.Extensions namespace to stop pollution (thanks for recommendation Andriy)
  • Fix pathing to Lexicon
  • NuGet packaging fixes

Version 1.0.2:

  • Permit passing of path to default-lexicon.xml into the XMLLexicon constructor
  • thereby permitting a rough-draft (and untested) .NET Core port

Version 1.0.0 First commit/NuGet:

  • Taken the current release of SimpleNLG (V4.4.8 API) version and generated a C# version.
  • Unit tests ported, with added tests for C# specifics (Java idioms in Regex, Collections, equals, strings.substring etc)
  • Current release English, with no HTML generation nor NIHLexicon import

How to Use SharpSimpleNLG?

I have to write some good documentation.

Look at the code in the Syntax Tutorials Unit Test. All these pass, so it is a good starter.

The simplenlg Tutorial is a good resource.

Or look at the general Unit Tests and see what simplenlg can do: SharpSimpleNLG Unit Tests

Building SharpSimpleNLG

  • Visual Studio 2015 with C# 6.0 recommended (as this is what I used)
  • I've only used C# null conditionals and string interpolation in a couple of places so C# 6.0 isn't a forced requirement
  • Assembly created is .NET 4.5.2, but there is only use of generic HashSet<T>, Stack<T>, List<T> and Dictionary<K,V> with no async/await - so it should port to earlier .NET if you are into that sort of thing.

Unit Tests

  • 270 Unit tests using NUnit included.

  • Passing Unit tests from the original project have been ported
  • Added Unit tests for this particular port
  • 7 tests do not pass; I think this is related to the configuration of the Unit tests rather than a code issue.

Learnings

I am sure someone somewhere at sometime (most likely me) will find my Learnings on Java to C# interesting and useful.

Outstanding and Future Work

  • contribute back to parent!
  • implement NIHLexicon and MultipleLexicon
  • implement HTMLFormatter
  • re-work Unit test hierarchy
  • continue to track simplenlg changes and additions
  • fluent-style sentence and phrase creation
  • More C#/functional style
  • Enums.ToString() change to Enum "side" hierarchy (because of C#/Java differences)
  • smarter types (eg: widely used Dictionary<string, object> to subclassed to make life easier)
  • Documentation specific to this port

Questions? You can find me on Twitter @RealNickHodge or email Nick Hodge

sharpsimplenlg's People

Contributors

andriysvyryd avatar nickhodge avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

pacohams

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.