forked from dmlc/gluon-nlp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update readme * update rst * update readme.rst * update readme.rst * update readme.rst * add readme, update sentiment analysis script link, add contributor page * add readme * update readme.rst * Update README.rst * Update README.rst * Update README.rst * update readme.rst * update readme.rst * update readme.rst * update readme.rst * update readme.rst * update readme and contribute * update readme
- Loading branch information
Showing
4 changed files
with
161 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,145 @@ | ||
Gluon NLP Toolkit | ||
================= | ||
.. raw:: html | ||
|
||
<a href="http://gluon-nlp.mxnet.io/master/index.html"><p align="center"><img width="25%" src="docs/_static/gluon_s2.png" /></a> | ||
</p> | ||
|
||
.. raw:: html | ||
|
||
<h3 align="center"> | ||
|
||
GluonNLP: Your Choice of Deep Learning for NLP | ||
|
||
.. raw:: html | ||
|
||
</h3> | ||
|
||
.. raw:: html | ||
|
||
<a href='http://ci.mxnet.io/job/gluon-nlp/job/master/'><img src='http://ci.mxnet.io/job/gluon-nlp/job/master/badge/icon'></a> | ||
<a href='http://ci.mxnet.io/job/gluon-nlp/job/master/'><img src='https://img.shields.io/badge/python-2.7%2C%203.6-blue.svg'></a> | ||
<a href='http://ci.mxnet.io/job/gluon-nlp/job/master/'><img src='https://codecov.io/gh/leezu/gluon-nlp/branch/master/graph/badge.svg?token=xQ2HKDk9ux'></a> | ||
|
||
This is a toolkit that enables fast prototyping for NLP research and | ||
applications. | ||
<a href='http://ci.mxnet.io/job/gluon-nlp/job/master/'><img src='http://ci.mxnet.io/job/gluon-nlp/job/master/badge/icon'></a> | ||
|
||
GluonNLP is a toolkit that enables easy text preprocessing, datasets | ||
loading and neural models building to help you speed up your Natural | ||
Language Processing (NLP) research. | ||
|
||
- `Quick Start Guide <#quick-start-guide>`__ | ||
- `Resources <#resources>`__ | ||
- `Contributors <http://gluon-nlp.mxnet.io/master/contributor.html>`__ | ||
|
||
Installation | ||
============ | ||
|
||
Make sure you have Python 2.7 or Python 3.6 and recent version of MXNet. | ||
You can install ``MXNet`` and ``GluonNLP`` using pip: | ||
|
||
:: | ||
|
||
pip install --pre --upgrade mxnet | ||
pip install gluonnlp | ||
|
||
Docs 📖 | ||
====== | ||
|
||
GluonNLP documentation is available at `our | ||
website <http://gluon-nlp.mxnet.io/master/index.html>`__. | ||
|
||
Community | ||
========= | ||
|
||
For questions and comments, please visit our `forum <https://discuss.mxnet.io/>`__ | ||
(and `Chinese version <https://discuss.gluon.ai/>`__). For bug reports, please submit Github issues. | ||
|
||
How to Contribute | ||
================= | ||
|
||
GluonNLP has been developed by community members. Everyone is | ||
more than welcome to contribute. We together can make the GluonNLP better | ||
and more user-friendly to more users. | ||
|
||
Read our `contributing | ||
guide <http://gluon-nlp.mxnet.io/master/how_to/contribute.html>`__ to get | ||
to know about our development procedure, how to propose bug fixes and | ||
improvements, as well as how to build and test your changes to GluonNLP. | ||
|
||
Check out the `contributors <http://gluon-nlp.mxnet.io/master/contributor.html>`__ for GluonNLP 0.2.0. | ||
|
||
Resources | ||
========= | ||
|
||
Check out how to use GluonNLP for your own research or projects. | ||
|
||
If you are new to Gluon, please check out our `60-minute crash course | ||
<http://gluon-crash-course.mxnet.io/>`__. | ||
|
||
For getting started quickly, refer to notebook runnable examples at | ||
`Examples. <http://gluon-nlp.mxnet.io/master/examples/index.html>`__ | ||
|
||
For advanced examples, check out our | ||
`Scripts. <http://gluon-nlp.mxnet.io/master/scripts/index.html>`__ | ||
|
||
For experienced users, check out our | ||
`API Notes <http://gluon-nlp.mxnet.io/master/api/index.html>`__. | ||
|
||
Quick Start Guide | ||
================= | ||
|
||
`Dataset Loading <http://gluon-nlp.mxnet.io/master/api/data.html>`__ | ||
------------------------------------------------------------------------------------- | ||
|
||
Load the Wikitext-2 dataset, for example: | ||
|
||
.. code:: python | ||
>>> import gluonnlp as nlp | ||
>>> train = nlp.data.WikiText2(segment='train') | ||
>>> train[0][0:5] | ||
['=', 'Valkyria', 'Chronicles', 'III', '='] | ||
`Vocabulary Construction <http://gluon-nlp.mxnet.io/master/api/vocab.html>`__ | ||
--------------------------------------------------------------------------------- | ||
|
||
Build vocabulary based on the above dataset, for example: | ||
|
||
.. code:: python | ||
>>> vocab = nlp.Vocab(counter=nlp.data.Counter(train[0])) | ||
>>> vocab | ||
Vocab(size=33280, unk="<unk>", reserved="['<pad>', '<bos>', '<eos>']") | ||
`Neural Models Building <http://gluon-nlp.mxnet.io/master/api/model.html>`__ | ||
----------------------------------------------------------------------------------- | ||
|
||
From the models package, apply an Standard RNN langauge model to the | ||
above dataset: | ||
|
||
.. code:: python | ||
>>> model = nlp.model.language_model.StandardRNN('lstm', len(vocab), | ||
... 200, 200, 2, 0.5, True) | ||
>>> model | ||
StandardRNN( | ||
(embedding): HybridSequential( | ||
(0): Embedding(33280 -> 200, float32) | ||
(1): Dropout(p = 0.5, axes=()) | ||
) | ||
(encoder): LSTM(200 -> 200.0, TNC, num_layers=2, dropout=0.5) | ||
(decoder): HybridSequential( | ||
(0): Dense(200 -> 33280, linear) | ||
) | ||
) | ||
`Word Embeddings Loading <http://gluon-nlp.mxnet.io/master/api/embedding.html>`__ | ||
--------------------------------------------------------------------------------- | ||
|
||
For example, load a GloVe word embedding, one of the state-of-the-art | ||
English word embeddings: | ||
|
||
.. code:: python | ||
>>> glove = nlp.embedding.create('glove', source='glove.6B.50d') | ||
# Obtain vectors for 'baby' in the GloVe word embedding | ||
>>> type(glove['baby']) | ||
<class 'mxnet.ndarray.ndarray.NDArray'> | ||
>>> glove['baby'].shape | ||
(50,) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Contributors | ||
=============================== | ||
|
||
We would like to express our thanks to the following contributors to the GluonNLP 0.2.0. | ||
|
||
- `Lausen, Leonard <https://github.com/leezu>`__ | ||
- `Li, Mu <https://github.com/mli>`__ | ||
- `Shi, Xingjian <https://github.com/sxjscience>`__ | ||
- `Wang, Chenguang <https://github.com/cgraywang>`__ | ||
- `Zha, Sheng <https://github.com/szha>`__ | ||
- `Zhang, Aston <https://github.com/astonzhang>`__ | ||
- `Zheng, Shuai <https://github.com/szhengac>`__ | ||
|
||
.. note:: | ||
|
||
The contributors are ordered by last name alphabetical order. | ||
|
||
We are looking forward to work with you. Please follow our `contributing guide | ||
<http://gluon-nlp.mxnet.io/master/how_to/contribute.html>`__ to contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters