[![Build Status](https://travis-ci.org/totalgood/nlpia.svg?branch=master)](https://travis-ci.org/totalgood/nlpia)
[![Coverage](https://codecov.io/gh/totalgood/nlpia/branch/master/graph/badge.svg)](https://codecov.io/gh/totalgood/nlpia)
[![GitHub release](https://img.shields.io/github/release/totalgood/nlpia.svg)](https://github.com/totalgood/nlpia/releases/latest)
[![PyPI version](https://img.shields.io/pypi/pyversions/nlpia.svg)](https://pypi.org/project/nlpia/)
[![License](https://img.shields.io/pypi/l/nlpia.svg)](https://pypi.python.org/pypi/nlpia/)
<!---
Some more badges from grakn.ai and search of github markdown files
### downloads are no longer provided by pypi: https://mail.python.org/pipermail/distutils-sig/2016-May/028986.html
[![PyPI Package monthly downloads](https://img.shields.io/pypi/dm/nlpia.svg?style=flat)](https://pypi.python.org/pypi/nlpia
[![GitHub release](https://img.shields.io/github/release/graknlabs/grakn.svg)](https://github.com/graknlabs/grakn/releases/latest)
[![Build Status](https://travis-ci.org/graknlabs/grakn.svg?branch=internal)](https://travis-ci.org/graknlabs/grakn)
[![Slack Status](http://totalgood.herokuapp.com/badge.svg)](https://totalgood.com/slack)
[![Stack Overflow][stackoverflow-shield]][stackoverflow-link]
[![Download count](https://img.shields.io/github/downloads/graknlabs/grakn/total.svg)](https://grakn.ai/download)
---
[![Static Bugs](https://sonarcloud.io/api/project_badges/measure?project=ai.grakn%3Agrakn&metric=bugs)](https://sonarcloud.io/dashboard?id=ai.grakn%3Agrakn)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=ai.grakn%3Agrakn&metric=code_smells)](https://sonarcloud.io/dashboard?id=ai.grakn%3Agrakn)
[![Duplicated Code](https://sonarcloud.io/api/project_badges/measure?project=ai.grakn%3Agrakn&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=ai.grakn%3Agrakn)
[stackoverflow-shield]: https://img.shields.io/badge/stackoverflow-grakn-blue.svg
[stackoverflow-link]: https://stackoverflow.com/questions/tagged/grakn
--->
# NLPIA
Community-driven code for the book [**N**atural **L**anguage **P**rocessing **i**n **A**ction](http://bit.ly/gh-readme-nlpia-book).
## Description
A community-developed book about building socially responsible NLP pipelines that give back to the communities they interact with.
## Getting Started
You'll need a bash shell on your machine.
[Git](https://git-scm.com/downloads) has installers that include bash shell for all three major OSes.
Once you have Git installed, launch a bash terminal.
It will usually be found among your other applications with the name `git-bash`.
### Step 1. Install [Anaconda3](https://docs.anaconda.com/anaconda/install/)
* [Linux](https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh)
* [MacOSX](https://repo.anaconda.com/archive/Anaconda3-5.2.0-MacOSX-x86_64.pkg)
* [Windows](https://repo.anaconda.com/archive/Anaconda3-5.2.0-Windows-x86_64.exe)
If you're installing Anaconda3 using a GUI, be sure to check the box that updates your PATH variable.
Also, at the end, the Anaconda3 installer will ask if you want to install VSCode.
Microsoft's VSCode is a decent Python editor/linter if you're willing to send your data to Microsoft to enable all the linting features.
Some of us prefer Sublime Text 3 to the open source IDEs like Atom and VSCode. In Sublime you can get complete linting and spellchecking and auto-delinters for free, even in offline mode (no intrusive data slurping or EULA).
### Step 2. Install an Editor
You can skip this step if you are happy using `jupyter notebook` or `VSCode` or the editor built into Anaconda3.
I like [Sublime Text](https://www.sublimetext.com/3).
It's a lot cleaner and more mature than the alternatives.
Plus it has more plugins written by individual developers like you.
### Step 3. Install Git and Bash
* Linux -- already installed
* MacOSX -- already installed
* [Windows](https://git-scm.com/downloads)
If you're on Linux or Mac OS, you're good to go. Just figure out how to launch a terminal and make sure you can run `ipython` or `jupyter notebook` in it. This is where you'll play around with your own NLP pipeline.
#### Windows
On Windows you have a bit more work to do. Supposedly Windows 10 will let you install Ubuntu with a terminal and bash. But the terminal and shell that comes with [`git`](https://git-scm.com/downloads) is probably a safer bet. It's maintained by a broader open source community.
You need to make sure your `PATH` variable includes a path to `conda`, `python` and other command line apps installed by Anaconda. This can sometimes be set with something like this:
```
echo "PATH=$HOME/Anaconda3/bin:$PATH" >> ~/.bashrc
```
or
```bash
echo "PATH=/c/Users/$USER/AppData/Local/Continuum/Anaconda3/:$PATH" >> ~/.bashrc
```
You'll need to make sure you new MINGW64 terminal is launched with `winpty` to trick windows into treating the `MINGW64` terminal (git-bash) like a standards-compliant TTY terminal application. So add these aliases to your `~/.bashrc` from within your git-bash terminal:
```bash
echo "alias python='winpty python'" >> ~/.bashrc
echo "alias jupyter='winpty jupyter'" >> ~/.bashrc
echo "alias ipython='winpty ipython'" >> ~/.bashrc
```
### Step 4. Clone this repository
```bash
git clone https://github.com/totalgood/nlpia.git
```
### Step 5. Install `nlpia`
You have two alternative package managers you can use to install `nlpia`:
5.1. `conda`
5.2. `pip`
Or you can a reader's container with:
5.3. `docker`
In most cases, `conda` will be able to install python packages faster and more reliably than pip. Without `conda` Some packages, such as `python-levenshtein`, require you to compile a C library during installation. Windows doesn't have a a compiler and python package installer that will "just work."
#### Alternative 5.1. `conda`
Use conda (part of the Anaconda package that you installed in Step 1 above) to create an environment called `nlpiaenv`:
```bash
cd nlpia # make sure you're in the nlpia directory that contains `setup.py`
conda env create -n nlpiaenv -f conda/environment.yml
conda install -y pip # to get the latest version of pip
conda activate nlpiaenv
pip install -e .
```
Whenever you want to be able to import or run any `nlpia` modules, you'll need to activate this conda environment first:
```bash
$ conda activate nlpiaenv
```
On **Windows** CMD prompt (Anaconda Prompt in Applications) there is no source command so:
```dos
C:\ activate nlpiaenv
```
Now make sure you can import nlpia with:
```bash
python -c "print(import nlpia)"
```
Skip to Step 6 ("Have fun!") if you have successfully created and activated an environment containing the `nlpia` package and its dependencies.
#### Alternative 5.2. `pip`
You can try this first, if you're feeling lucky:
```bash
cd nlpia
pip install --upgrade pip
pip install -e .
```
Or if you don't think you'll be editing any of the source code for nlpia and you don't want to contribute to the community here you can just:
```bash
pip install nlpia
```
Linux-based OSes like Ubuntu and OSX come with C++ compilers built-in, so you may be able to install the dependencies using pip instead of `conda`.
But if you're on Windows and you want to install packages, like `python-levenshtein` that need compiled C++ libraries, you'll need a compiler.
Fortunately Microsoft still lets you [download a compiler for free](https://wiki.python.org/moin/WindowsCompilers#Microsoft_Visual_C.2B-.2B-_14.0_standalone:_Visual_C.2B-.2B-_Build_Tools_2015_.28x86.2C_x64.2C_ARM.29), just make sure you follow the links to the Visual Studio "Build Tools" and not the entire Visual Studio package.
Once you have a compiler on your OS you can install `nlpia` using pip:
```bash
cd nlpia # make sure you're in the nlpia directory that contains `setup.py`
pip install --upgrade pip
mkvirtualenv nlpiaenv
source nlpiaenv/bin/activate
pip install -r requirements-test.txt
pip install -
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共373个文件
py:114个
txt:51个
md:36个
资源分类:Python库 所属语言:Python 资源全名:nlpia-0.1.89.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
Python库 | nlpia-0.1.89.tar.gz (373个子文件)
nlpia_seq2seq.adoc 2KB
words_libre_office_names_us.aff 37KB
words_hunspell_us.aff 11KB
greeting_step5.aiml 2KB
greeting.aiml 2KB
greeting_step4.aiml 911B
greeting_step2.aiml 848B
greeting_step3.aiml 556B
tutorialspoint_einstein_srai_example.aiml 535B
greeting2.aiml 425B
greeting_step1.aiml 204B
Appendix F -- Glossary.asc 2KB
AUTHORS 329B
bld.bat 107B
book 168B
setup.cfg 2KB
CNAME 9B
commit-msg 1KB
commit-msg 1KB
.condarc 73B
.coveragerc 933B
trainfiles.csv 11.4MB
moviedialog.csv 4.85MB
sentiment-Ratings_Warriner_et_al.csv 3.56MB
sms-spam.csv 482KB
tweets_GroundTruth.csv 380KB
valfiles.csv 236KB
utf8_longascii.csv 119KB
utf8.csv 118KB
utf8_1024.csv 90KB
diabetes.csv 87KB
utf8_table.csv 65KB
utf8_byhand.csv 50KB
utf8_256.csv 50KB
power_phrases.csv 25KB
etpinard.csv 23KB
inspirational_quotes.csv 13KB
cities_air_pollution.csv 11KB
inspirational_quotes_business.csv 11KB
us_gov_deficits_raw.csv 9KB
us_gov_deficits.csv 7KB
file_extensions.csv 5KB
fortune500-twitter.csv 4KB
google_ngram_viewer_corpora.csv 3KB
router_lan_IP_addresses.csv 3KB
mavis-batey-greetings.csv 3KB
question_label_definitions.csv 2KB
l33t.csv 2KB
pos_tag_abbreviations.csv 1KB
iq_test.csv 1KB
states.csv 809B
data_info.csv 511B
food_carbon.csv 379B
words_hunspell_us.dic 680KB
words_libre_office_names_us.dic 88KB
Dockerfile 230B
secrets.cfg.EXAMPLE_TEMPLATE 691B
.gitignore 1KB
.gitignore 18B
cities_us.csv.gz 1.25MB
pointcloud.csv.gz 1.23MB
sentiment-word-ratings-warriner.csv.gz 1.1MB
cities_us_wordvectors_meta.csv.gz 1.07MB
movieReviewSnippets_GroundTruth.csv.gz 552KB
cities_us_wordvectors_pca2_meta.csv.gz 442KB
cities_us_wordvectors_pca2.csv.gz 276KB
nytEditorialSnippets_GroundTruth.csv.gz 245KB
tweets_GroundTruth.csv.gz 165KB
amazonReviewSnippets_GroundTruth.csv.gz 133KB
X_tsne3.csv.gz 103KB
X_tsne2.csv.gz 103KB
sentiment-word-ratings-sensori-motor-wisconsin.csv.gz 27KB
economic_development_by_continents.csv.gz 6KB
economic_development.csv.gz 4KB
country_toxoplasmosis.csv.gz 3KB
cities_us_wordvectors_plot.csv.gz 2KB
decoder_seq2seq.hd5 1.24MB
encoder_seq2seq.hd5 1.19MB
lda_spam_3d_scatter.html 2.99MB
wordmap_500_US_cities.html 2.18MB
us-city-word-vector-pca-map.html 2.17MB
wordmap_100_US_cities.html 2.15MB
wordmap.html 2.14MB
utf8_table.html 201KB
HTTP_1.1 Status Code Definitions.html 33KB
book.html 168B
pytest.ini 2KB
tox.ini 518B
ch09_imdb_sentiment_lstm_v2.ipynb 518KB
ch08.ipynb 34KB
ch03_2.ipynb 28KB
ch09.ipynb 28KB
ch10_train_seq2seq.ipynb 27KB
ch05_2.ipynb 16KB
ch07.ipynb 13KB
ch10_batching_utils.ipynb 7KB
ch10.ipynb 6KB
ch09_imdb_sentiment_lstm_v1.ipynb 5KB
Untitled-checkpoint.ipynb 72B
ch07_telephone_pole.jpg 6KB
共 373 条
- 1
- 2
- 3
- 4
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功