All Projects → xiamx → lemma

xiamx / lemma

Licence: Apache-2.0 license
A Morphological Parser (Analyser) / Lemmatizer written in Elixir.

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to lemma

GrammarEngine
Грамматический Словарь Русского Языка (+ английский, японский, etc)
Stars: ✭ 68 (+51.11%)
Mutual labels:  lemmatizer, morphological-analyser, lemmatization
Turkish-Lemmatizer
Lemmatization for Turkish Language
Stars: ✭ 72 (+60%)
Mutual labels:  lemmatizer, lemmatization
alix
A Lucene Indexer for XML, with lexical analysis (lemmatization for French)
Stars: ✭ 15 (-66.67%)
Mutual labels:  lemmatizer, lemmatization
frog
Frog is an integration of memory-based natural language processing (NLP) modules developed for Dutch. All NLP modules are based on Timbl, the Tilburg memory-based learning software package.
Stars: ✭ 70 (+55.56%)
Mutual labels:  morphology, morphological-analyser
simplemma
Simple multilingual lemmatizer for Python, especially useful for speed and efficiency
Stars: ✭ 32 (-28.89%)
Mutual labels:  lemmatizer, lemmatization
syntaxdot
Neural syntax annotator, supporting sequence labeling, lemmatization, and dependency parsing.
Stars: ✭ 32 (-28.89%)
Mutual labels:  morphology, lemmatization
zeyrek
Python morphological analyzer for Turkish language. Partial port of ZemberekNLP.
Stars: ✭ 36 (-20%)
Mutual labels:  morphology, lemmatization
libmorph
libmorph rus/ukr - fast & accurate morphological analyzer/analyses for Russian and Ukrainian
Stars: ✭ 16 (-64.44%)
Mutual labels:  lemmatizer, lemmatization
wink-lemmatizer
English lemmatizer
Stars: ✭ 53 (+17.78%)
Mutual labels:  lemmatizer, lemmatization
PyKOMORAN
(Beta) PyKOMORAN is wrapped KOMORAN in Python using Py4J.
Stars: ✭ 38 (-15.56%)
Mutual labels:  morphological-analyser
nlp-cheat-sheet-python
NLP Cheat Sheet, Python, spacy, LexNPL, NLTK, tokenization, stemming, sentence detection, named entity recognition
Stars: ✭ 69 (+53.33%)
Mutual labels:  lemmatization
NMeCab
Japanese morphological analyzer on .NET
Stars: ✭ 65 (+44.44%)
Mutual labels:  morphological-analyser
ImageMorphology.jl
Morphological operations for image processing
Stars: ✭ 23 (-48.89%)
Mutual labels:  morphology
jargon
Tokenizers and lemmatizers for Go
Stars: ✭ 98 (+117.78%)
Mutual labels:  lemmatizer
Basic-Image-Processing
Implementation of Basic Digital Image Processing Tasks in Python / OpenCV
Stars: ✭ 102 (+126.67%)
Mutual labels:  morphology
elasticsearch-sudachi
The Japanese analysis plugin for elasticsearch
Stars: ✭ 129 (+186.67%)
Mutual labels:  morphological-analyser
nerus
Large silver standart Russian corpus with NER, morphology and syntax markup
Stars: ✭ 47 (+4.44%)
Mutual labels:  morphology
lara-hungarian-nlp
NLP class for rapid ChatBot development in Hungarian language
Stars: ✭ 27 (-40%)
Mutual labels:  lemmatizer
awesome-cytodata
A curated list of awesome cytodata resources
Stars: ✭ 40 (-11.11%)
Mutual labels:  morphology
OpenHebrewBible
Open Hebrew Bible Project; aligning BHS with WLC; bridging ETCBC, OpenScriptures & Berean data on Hebrew Bible
Stars: ✭ 43 (-4.44%)
Mutual labels:  morphology

Lemma

Build Status Hex.pm license

A Morphological Parser (Analyser) / Lemmatizer written in Elixir. It is implemented using a textbook classic method relying in an abstraction called Finite State Transducer.

What are morphological parsing and lemmatization?

For grammatical reasons, documents are going to use different forms of a word, such as organize, organizes, and organizing. Additionally, there are families of derivationally related words with similar meanings, such as democracy, democratic, and democratization. In many situations, it seems as if it would be useful for a search for one of these words to return documents that contain another word in the set.
The goal of both stemming and lemmatization is to reduce inflectional forms and sometimes derivationally related forms of a word to a common base form. For instance:

am, are, is ⇒ be
car, cars, car's, cars' ⇒ car

The result of this mapping of text will be something like:
the boy's cars are different colors ⇒ the boy car be differ color.
-- Stanford NLP Group

Not for production use, this library is neither cpu nor memory efficient

Example Usage

# Initialize a new morphological parser for English
parser = Lemma.new :en
assert {:ok, "play"} == parser |> Lemma.parse("plays")

Documentation can be found at https://hexdocs.pm/lemma.

Installation

If available in Hex, the package can be installed by adding lemma to your list of dependencies in mix.exs:

def deps do
  [{:lemma, "~> 0.1.0"}]
end

Benchmarking

Lemmatize a paragraph of words

A simple benchmarking script is provided to test the performance of performing lemmatization on a paragraph of words. The script can be invoked with mix run benchmarks/lemmatizing.exs

Sample output

Benchmark using 430 fixture words
Operating System: Windows
CPU Information: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz
Number of Available Cores: 4
Available memory: 12.753915904 GB
Elixir 1.5.0
Erlang 19.2
Benchmark suite executing with the following configuration:
warmup: 2.00 s
time: 5.00 s
parallel: 1
inputs: none specified
Estimated total run time: 7.00 s


Benchmarking Lemmatize input sequential...

Name                                 ips        average  deviation         median
Lemmatize input sequential          4.31      232.14 ms    68.17%      110.00 ms

Compile-time vs Runtime parser

To evaluate the difference between building the parser at compile time vs. building the parser at runtime, we have another benchmarking script. The script can be invoked with mix run benchmarks/runtime_vs_compiletime.exs

Sample output

Operating System: Windows
CPU Information: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz
Number of Available Cores: 4
Available memory: 12.753915904 GB
Elixir 1.5.0
Erlang 19.2
Benchmark suite executing with the following configuration:
warmup: 2.00 s
time: 5.00 s
parallel: 1
inputs: none specified
Estimated total run time: 14.00 s


Benchmarking Compiled parser...
Benchmarking Dynamic parser...

Name                      ips        average  deviation         median
Compiled parser       15.91 K       62.86 us   123.32%         0.0 us
Dynamic parser         3.80 K      262.91 us   118.03%      160.00 us

Comparison:
Compiled parser       15.91 K
Dynamic parser         3.80 K - 4.18x slower
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].