Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit c14c5e3

Browse files
peterizchinnikrishna2231
authored andcommitted
Peter/v02 release update (#265)
* Update documentation and bump version * Update docs and minor fix * Update documentation * Update README.md * Fix legal headers and imports * Fixed documentation errors * minor * Minor docs fix * update api.rst
1 parent ee12307 commit c14c5e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+868
-1603
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ generated
2727
dist
2828
.nlp_architect_env/
2929
src/
30-
_generated_reqs.txt
3130
pylint.html
3231
pylint.txt
3332
flake8.txt
3433
nlp_architect/pipelines/bist-pretrained/*
3534
venv
36-
nlp_architect/api/ner-pretrained/*
35+
nlp_architect/api/ner-pretrained/*

CHANGELOG.md

Whitespace-only changes.

Makefile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ DOC_PUB_RELEASE_PATH := $(DOC_PUB_PATH)/$(RELEASE)
2121

2222
LIBRARY_NAME := nlp_architect
2323
VIRTUALENV_DIR := .nlp_architect_env
24-
REQ_FILE := _generated_reqs.txt
24+
REQ_FILE := requirements.txt
2525
ACTIVATE := $(VIRTUALENV_DIR)/bin/activate
2626
MODELS_DIR := $(LIBRARY_NAME)/models
2727
NLP_DIR := $(LIBRARY_NAME)/nlp
@@ -47,6 +47,8 @@ pylint: test_prepare
4747
@. $(ACTIVATE); pylint $(PYLINT_CHECK_DIRS) | tee pylint.txt
4848
@. $(ACTIVATE); python3 tests/utils/ansi2html.py pylint.txt > pylint.html
4949

50+
style: flake pylint
51+
5052
doc_prepare: doc_requirements.txt $(ACTIVATE)
5153
@. $(ACTIVATE); pip3 install -r doc_requirements.txt > /dev/null 2>&1
5254

@@ -64,24 +66,15 @@ html: doc_prepare $(ACTIVATE)
6466
clean:
6567
@echo "Cleaning files.."
6668
@rm -rf $(VIRTUALENV_DIR)
67-
@rm -rf $(REQ_FILE)
6869

6970
ENV_EXIST := $(shell test -d $(VIRTUALENV_DIR) && echo -n yes)
70-
REQ_EXIST := $(shell test -f $(REQ_FILE) && echo -n yes)
71-
72-
$(REQ_FILE):
73-
ifneq ($(REQ_EXIST), yes)
74-
@echo "Generating pip requirements file"
75-
@bash generate_reqs.sh
76-
endif
7771

7872
$(ACTIVATE): $(REQ_FILE)
7973
ifneq ($(ENV_EXIST), yes)
8074
@echo "NLP Architect installation"
8175
@echo "**************************"
8276
@echo "Creating new environment"
8377
@echo
84-
# virtualenv -p python3 $(VIRTUALENV_DIR)
8578
python3 -m venv $(VIRTUALENV_DIR)
8679
@. $(ACTIVATE); pip3 install -U pip
8780
endif

README.md

Lines changed: 77 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -4,65 +4,19 @@
44
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/NervanaSystems/nlp-architect/blob/master/LICENSE)
55
[![Docs](https://img.shields.io/readthedocs/pip/stable.svg)](http://nlp_architect.nervanasys.com)
66

7-
8-
NLP Architect is an open-source Python library for exploring state-of-the-art
9-
deep learning topologies and techniques for natural language processing and
10-
natural language understanding. It is intended to be a platform for future
7+
NLP Architect is an open-source Python library for exploring state-of-the-art
8+
deep learning topologies and techniques for natural language processing and
9+
natural language understanding. It is intended to be a platform for future
1110
research and collaboration.
1211

13-
The current version of NLP Architect includes these features that we found
14-
interesting from both research perspectives and practical applications:
15-
16-
* NLP core models that allow robust extraction of linguistic features for
17-
NLP workflow: for example, dependency parser (BIST) and NP chunker
18-
* NLU modules that provide best in class performance: for example, intent
19-
extraction (IE), name entity recognition (NER)
20-
* Modules that address semantic understanding: for example, colocations, most
21-
common word sense, NP embedding representation (e.g. NP2V)
22-
* Components instrumental for conversational AI: for example, ChatBot
23-
applications, including dialog system, sequence chunking and IE
24-
* End-to-end DL applications using new topologies: for example, Q&A, machine
25-
reading comprehension
26-
27-
<center> <img src="doc/source/assets/nlp_archtiect_v0.1.png"></center>
28-
29-
The library consists of core modules (topologies), data pipelines, utilities
30-
and end-to-end model examples with training and inference scripts. We look at
31-
these as a set of building blocks that were needed for implementing NLP use
32-
cases based on our pragmatic research experience. Each of the models includes
33-
algorithm descriptions and results in the [documentation].
34-
35-
Some of the components, with provided pre-trained models, are exposed as REST
36-
service APIs through NLP Architect server. NLP Architect server is designed to
37-
provide predictions across different models in NLP Architect. It also includes
38-
a web front-end exposing the model annotations for visualizations. Currently,
39-
we provide two services: BIST dependency parsing and NER annotations. We also
40-
provide a template for developers to add a new service.
41-
42-
<center> <img src="doc/source/assets/bist_service.png"></center>
43-
44-
45-
Because of its current research nature, several open source deep learning
46-
frameworks are used in this repository including:
47-
48-
* [Intel® neon]
49-
* [Intel® nGraph Python API]
50-
* [TensorFlow]
51-
* [Intel-Optimized TensorFlow]
52-
* [Keras]
53-
* [Dynet]
54-
55-
Over time, the list of models included in this space will change; though all
56-
generally run with Python 3.5+.
57-
5812
## Documentation
59-
Framework documentation on NLP models, algorithms, and modules, and instructions
13+
Framework documentation on NLP models, algorithms, and modules, and instructions
6014
on how to contribute can be found at our main [documentation] site.
6115

6216
## Installation
63-
Installing NLP Architect within a virtual environment to ensure a self-contained
64-
environment is recommended. To install NLP Architect within a new or already-existing
65-
virtual environment, or to install it system-wide, see the "Custom installations"
17+
Installing NLP Architect within a virtual environment to ensure a self-contained
18+
environment is recommended. To install NLP Architect within a new or already-existing
19+
virtual environment, or to install it system-wide, see the "Custom installations"
6620
section below.
6721

6822

@@ -72,10 +26,10 @@ To get started, clone our repository:
7226
$ git clone https://github.com/NervanaSystems/nlp-architect.git
7327
$ cd nlp-architect
7428

75-
Note that the `setuptools` package from a recent version of `pip` is needed to
29+
Note that the `setuptools` package from a recent version of `pip` is needed to
7630
get the `make` command to build properly.
7731

78-
$ pip3 install setuptools
32+
$ pip3 install -U setuptools
7933

8034

8135
Install in development mode (default):
@@ -90,18 +44,18 @@ Activate the newly-created virtual environment:
9044

9145
Fire up your favorite IDE/text editor/terminal and start running models.
9246

93-
### Custom installations
47+
### Custom installations
9448

9549

96-
* **Python 3 `venv`** The default installation instructions create a venv named
97-
`.nlp_architect_env`. If this is not ideal for your needs, (for example,
98-
if you want to name it something else or use an already-existing virtual env),
99-
simply create or enter the local virtual environment you want to use, activate
50+
* **Python 3 `venv`** The default installation instructions create a venv named
51+
`.nlp_architect_env`. If this is not ideal for your needs, (for example,
52+
if you want to name it something else or use an already-existing virtual env),
53+
simply create or enter the local virtual environment you want to use, activate
10054
it, and install the library in development mode with:
10155

10256
$ (py3_venv) make install_no_virt_env
10357

104-
Note that `setuptools` from a recent version of `pip` is needed to get the
58+
**Note** that `setuptools` from a recent version of `pip` is needed to get the
10559
`make` command to build properly.
10660

10761

@@ -110,15 +64,71 @@ Fire up your favorite IDE/text editor/terminal and start running models.
11064
$ make sysinstall
11165

11266

67+
_Note that all installations use CPU-based installations of Tensorflow/Dynet/Neon/nGraph. To install GPU supported binaries please refer to the framework's website for installation instructions._
68+
69+
## NLP Architect overview
70+
71+
The current version of NLP Architect includes these features that we found
72+
interesting from both research perspectives and practical applications:
73+
74+
* NLP core models and NLU modules that provide best in class performance: Intent
75+
Extraction (IE), Name Entity Recognition (NER), Word Chunker, Dependency parser (BIST)
76+
* Modules that address semantic understanding: co-locations, most
77+
common word sense, NP embedding representation (NP2Vec)
78+
* Components instrumental for conversational AI: ChatBot
79+
applications (Memory Networks for Dialog, Key-Value Memory Networks), Noun Phrase extraction
80+
* End-to-end DL applications using new topologies: Q&A, machine
81+
reading comprehension, Language modeling using Temporal Convolution
82+
Networks (TCN), Unsupervised Cross-lingual embeddings.
83+
* Solutions using one or more models: Set Term expansion which
84+
uses the included word chunker as a noun phrase extractor and NP2Vec.
85+
86+
87+
<center> <img src="doc/source/assets/nlp_architect_diag.png"></center>
88+
89+
The library consists of core modules (topologies), data pipelines, utilities
90+
and end-to-end model examples with training and inference scripts. We look at
91+
these as a set of building blocks that were needed for implementing NLP use
92+
cases based on our pragmatic research experience. Each of the models includes
93+
algorithm descriptions and results in the [documentation].
94+
95+
Some of the components, with provided pre-trained models, are exposed as REST
96+
service APIs through NLP Architect server. NLP Architect server is designed to
97+
provide predictions across different models in NLP Architect. It also includes
98+
a web front-end exposing the model annotations for visualizations. The server
99+
supports extensions via a template for developers to add a new service. For
100+
detailed documentation see this
101+
[page](http://nlp_architect.nervanasys.com/service.html).
102+
103+
See and example of the BIST parser model UI:
104+
105+
<center> <img src="doc/source/assets/bist_service.png"></center>
106+
107+
### Deep Learning Frameworks
108+
Because of its current research nature, several open source deep learning
109+
frameworks are used in this repository including:
110+
111+
* [Intel® neon]
112+
* [Intel® nGraph Python API]
113+
* [TensorFlow]
114+
* [Intel-Optimized TensorFlow]
115+
* [Keras]
116+
* [Dynet]
117+
118+
NLP Architect is an active space of research and development; Throughout future
119+
releases new models, solutions, topologies and framework additions and changes
120+
will be made. We aim to make sure all models run with Python 3.5+. We
121+
encourage researchers and developers to contribute their work into the library.
122+
113123
## Disclaimer
114-
The NLP Architect is released as reference code for research purposes. It is
115-
not an official Intel product, and the level of quality and support may not be
116-
as expected from an official product. Additional algorithms and environments are
117-
planned to be added to the framework. Feedback and contributions from the open
124+
The NLP Architect is released as reference code for research purposes. It is
125+
not an official Intel product, and the level of quality and support may not be
126+
as expected from an official product. Additional algorithms and environments are
127+
planned to be added to the framework. Feedback and contributions from the open
118128
source and NLP research communities are more than welcome.
119129

120130
## Contact
121-
Contact the NLP Architect development team through Github issues or
131+
Contact the NLP Architect development team through Github issues or
122132
123133

124134

@@ -127,6 +137,6 @@ email: [email protected]
127137
[Intel® nGraph Python API]:http://ngraph.nervanasys.com/docs/latest/python_api/index.html
128138
[Intel-Optimized TensorFlow]:https://software.intel.com/en-us/articles/intel-optimized-tensorflow-wheel-now-available
129139
[Intel® neon]:https://github.com/NervanaSystems/neon
130-
[TensorFlow]:https://www.tensorflow.org/
140+
[TensorFlow]:https://www.tensorflow.org/
131141
[Keras]:https://keras.io/
132142
[Dynet]:https://dynet.readthedocs.io/en/latest/

doc/source/CONTRIBUTING.rst

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,71 +25,71 @@ Contribution Process
2525
2. Clone and/or update your checked out copy of nlp-achitect to ensure you have the
2626
most recent commits from the master branch:
2727

28-
.. code-block:: bash
28+
.. code-block:: bash
2929
30-
git clone https://github.com/NervanaSystems/nlp-architect.git
31-
cd nlp-architect
32-
git fetch origin
33-
git checkout master
34-
git pull
30+
git clone https://github.com/NervanaSystems/nlp-architect.git
31+
cd nlp-architect
32+
git fetch origin
33+
git checkout master
34+
git pull
3535
3636
3. Create a new feature branch for your work and switch to it. Give it a
3737
meaningful name related to the task(s) at hand:
3838

39-
.. code-block:: bash
39+
.. code-block:: bash
4040
41-
git checkout -b my_new_feature_branch
41+
git checkout -b my_new_feature_branch
4242
4343
4. Ideally you'd start by creating one or more unit tests with the
4444
functionality you expect your new feature to perform. These should reside
4545
under the appropriate tests subdirectory of whatever you are changing.
4646
Then hack away at the code until you feel your feature is complete. Once
4747
satisfied, run the code through the following checks:
4848

49-
.. code-block:: bash
49+
.. code-block:: bash
5050
51-
make test # ensure all are OK
52-
make style # ensure there are no style related issues
53-
make lint # (optional). We still have a fair bit to clean up currently!
51+
make test # ensure all are OK
52+
make style # ensure there are no style related issues
53+
make lint # (optional). We still have a fair bit to clean up currently!
5454
5555
5. If necessary you may want to update and/or rebuild the documentation.
5656
This all exists under doc/source and is in
5757
`Sphinx reStructuredText format <http://sphinx-doc.org/rest.html>`_:
5858

59-
.. code-block:: bash
59+
.. code-block:: bash
6060
61-
make html # builds docs locally, starts a webserver so you can view
62-
or
63-
make doc # builds the doc and starts a local server directly
61+
make html # builds docs locally, starts a webserver so you can view
62+
or
63+
make doc # builds the doc and starts a local server directly
6464
6565
6. Commit your changes and push your feature branch to your github fork. Be
6666
sure to add a descriptive message and reference the github issue associated
6767
with your task (ex. #1). You will also want to rebase your commits down to
6868
a single sensible commit to make things clean for the merge process:
6969

70-
.. code-block:: bash
70+
.. code-block:: bash
7171
72-
git add my_updated_files
73-
git commit -m "Added new awesome functionality. Closes issue #1"
74-
git push origin my_new_feature_branch
72+
git add my_updated_files
73+
git commit -m "Added new awesome functionality. Closes issue #1"
74+
git push origin my_new_feature_branch
7575
7676
7. Create a new pull request to get your feature branch merged into master for
7777
others to use. You'll first need to ensure your feature branch contains the
7878
latest changes from master. Furthermore, internal devs will need to assign
7979
the request to someone else for a code review. You must also ensure there
8080
are no errors when run through the items defined in step 4.
8181

82-
.. code-block:: bash
82+
.. code-block:: bash
8383
84-
# (external contribs): make a new pull request:
85-
https://github.com/NervanaSystems/nlp-architect/pulls
84+
# (external contribs): make a new pull request:
85+
https://github.com/NervanaSystems/nlp-architect/pulls
8686
87-
# merge latest master changes into your feature branch
88-
git fetch origin
89-
git checkout master
90-
git pull origin master
91-
git checkout my_new_feature_branch
92-
git merge master # you may need to manually resolve any merge conflicts
87+
# merge latest master changes into your feature branch
88+
git fetch origin
89+
git checkout master
90+
git pull origin master
91+
git checkout my_new_feature_branch
92+
git merge master # you may need to manually resolve any merge conflicts
9393
9494
8. If there are issues you can continue to push commits to your feature branch
9595
by following step 6. They will automatically be added to this same merge
@@ -98,12 +98,12 @@ Contribution Process
9898
9. Once your change has been successfully merged, you can remove the source
9999
branch and ensure your local copy is up to date:
100100

101-
.. code-block:: bash
101+
.. code-block:: bash
102102
103-
git fetch origin
104-
git checkout master
105-
git pull
106-
git branch -d my_new_feature_branch
107-
git branch -d -r origin/my_new_feature_branch
103+
git fetch origin
104+
git checkout master
105+
git pull
106+
git branch -d my_new_feature_branch
107+
git branch -d -r origin/my_new_feature_branch
108108
109109
10. Give yourself a high five for a job well done!

0 commit comments

Comments
 (0)