Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Deep Learning for Natural Language Processing
| Date | Stars |
|---|---|
| 2026-07-31 | 462 |
| 2026-08-01 | 462 |
| 2026-08-06 | 462 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
************************************************************
``deepnl`` --- Deep Learning for Natural Language Processing
************************************************************
``deepnl`` is a Python library for Natural Language Processing tasks based on
a Deep Learning neural network architecture.
The library currently provides tools for performing part-of-speech tagging,
Named Entity tagging and Semantic Role Labeling.
``deepnl`` also provides code for creating *word embeddings* from text, using
either the Language Model approach by [Collobert11]_, or Hellinger PCA,
as in [Lebret14]_.
It can also create *sentiment specific word embeddings* from a corpus of
annotated Tweets.
If you use ``deepnl``, please cite [Attardi]_ in your publications.
**WARNING**. There has been a change in file format for models since version 1.3.14.
You will have to retrain them to use with later versions.
Installation
===========
Download the code or clone the repository on your machine with:
$ git clone https://github.com/attardi/deepnl.git
Ensure that you have the dependencies mentioned below, then proceed to the build process described below.
Dependencies
------------
``deepnl`` requires numpy_ and Eigen_.
A C++ compiler is also needed for compiling the C++ extensions it uses,
produced with Cython_.
The generated ``.cpp`` files are already provided with ``deepnl``, but you
will need Cython_ if you want to develop or modify the C++ extensions.
Build
-----
To compile the library, run::
$ python2 setup.py build
This will invoke the C++ compiler to compile the code on your platform.
You can run the scripts directly from the ``bin`` directory, or you can
install them by calling::
$ sudo python setup.py install
If Cython gets invoked and raises error, force an update on the file
timestamps, with:
$ touch deepnl/*.cpp
Basic usage
===========
``deepnl`` can be used both as a Python library or through command line scripts.
Library usage
-------------
You can use ``deepnl`` as a library in Python code as follows, where
``filename`` is the name of the file containing the model produced through training:
.. code-block:: python
>>> from deepnl.tagger import Tagger
>>> tagger = Tagger.load(open(filename))
>>> sent = 'The quick brown fox jumped over the lazy dog .'
>>> tagger.tag_sequence(sent.split(), return_tokens=True)
[[(u'The', u'DT'), (u'quick', u'JJ'), (u'brown', u'JJ'), (u'fox', u'NN'), (u'jumped', u'VBD'), (u'over', u'IN'), (u'the', u'DT'), (u'lazy', u'JJ'), (u'dog', u'NN'), (u'.', '.')]]
Class ``Tagger`` is a generic interface for sequence taggers and provides a
method ``tag_sequence`` for tagging a sentence.
A sentence is represented as a list of tokens.
Class ``Tagger`` can be used directly for performing POS tagging.
Two specializations are provided: ``NerTagger`, for Named Entity tagging and
``SrlTagger`` for Semantic Role Labeling.
The output of ``tag_sequence`` is normally a list of tuples, representing
tokens with their associated tags. In the case of POS tagging, the tags are
just the POS tags of each token; in case of ``NerTagger`` the tags are in
``IOB`` notation for representing subsequences, while in the case of
``SrlTagger`` the output is more complex.
Standalone scripts
------------------
``deepnl`` provides scripts for tagging text or training new models.
They are present in the `bin` subdirectory where you downloaded the code.
If you did not install them, you can invoke them directly from there.
Call them with option ``-h`` or ``--help`` to obtain details on their usage.
The scripts expect tokenized input, one token per line, with an empty line to
separate sentences.
When training, the token attributes are supplied in TSV (tab separated values) format.
Here is an example of POS tagging, using a previously trained model from file ``pos.dnn``:
.. code-block:: bash
$ dl-pos.py pos.dnn
The
quick
brown
fox
jumped
over
the
lazyExcerpt of 8,455 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:cb26289df81142ab, desc:natural language processing