View Source Needlepoint (Needlepoint v0.1.0)

NLP Experiments With Elixir

The Needlepoint library is a collection of NLP functions for Elixir, generally ported from sPacy or NLTK Python libraries.

Link to this section Summary

Functions

Stem with a given stemmer. Defaults to snowball.

Tokenize with a given tokenizer. Defaults to treebank.

Link to this section Functions

Link to this function

stem(text, stemmer \\ Needlepoint.Stem.SnowballStemmer)

View Source
@spec stem(String.t(), module()) :: String.t()

Stem with a given stemmer. Defaults to snowball.

examples

Examples

iex> Needlepoint.stem("sentence")
"sentenc"
Link to this function

tokenize(text, tokenizer \\ Needlepoint.Tokenizer.Treebank, opts \\ [])

View Source
@spec tokenize(String.t(), module(), []) :: [String.t()]

Tokenize with a given tokenizer. Defaults to treebank.

examples

Examples

iex> Needlepoint.tokenize("A sentence of words.")
["A", "sentence", "of", "words", "."]