UnityNLP icon indicating copy to clipboard operation
UnityNLP copied to clipboard

Natural Language Processing in Unity.

Unity NLP

This package references 2 repositories, OpenNLP and CherubNLP. UnityNLP is a collection of natural language processing tools written in C# that is targeted towards the Unity Engine. Currently it provides the following NLP tools:

  • [x] tokenizer
  • [x] sentence splitter
  • [x] part-of-speech tagger
  • [x] chunker (used to "find non-recursive syntactic annotations such as noun phrase chunks")
  • [x] parser
  • [x] name finder
  • [x] coreference tool
  • [x] interface to the WordNet lexical database
  • [x] topical classifier

You can find the documentation at: https://unitynlp.readthedocs.io/

Table of contents

  • Unity NLP
    • Table of contents
    • Installation
    • Examples
      • Tokenizer
      • Sentence Splitter
      • Part of Speech
      • Named Entity Recognition
      • Multinomial Naive Bayes Classifier
    • Support the project!
    • Join the community!
    • License
    • References

Installation

External dependencies:

  1. Clone the UnityUtil repository into your Packages folder.
  2. Clone the UnityAI repository into your Packages folder.
  3. Clone this repository into your Packages folder.
  4. Download all essential models and import them into the project.
  5. Place the models in the StreamingAssets folder.
  6. And you are ready to go!

Make a feature request in the issues tab if you think there is something missing or if you have new ideas!

Examples

All the sample code are in the Samples~ folder which can be imported into unity from the package manager.

Tokenizer

Tokenize

Sentence Splitter

SentenceSplitter

Part of Speech

For the full list of part of speech abbreviations, please refer to the Penn Treebank Project.

POS

Named Entity Recognition

NER

Multinomial Naive Bayes Classifier

NBClassifier

Support the project!

patreon kofi

Join the community!

discord

License

This repository as a whole is licensed under the Apache License 2.0. Individual files may have a different, but compatible license.

See license file for details.

References