GitXplorerGitXplorer
M

nlp-capstone

public
1 stars
0 forks
11 issues

Commits

List of commits on branch master.
Unverified
a66e3da26a419efe0040d6800a7f3a048b09d61c

Merge branch 'master' of https://github.com/Michael0x2a/nlp-capstone

bbriankchan committed 8 years ago
Unverified
3b82cc80b15a5471f56a2c6e4157a29baf09ef7a

Tweak best hyperparameters for conv models

MMichael0x2a committed 8 years ago
Unverified
235ea755c2c8b9d362407223845cd5049bf8ef51

Add rewrite demo

bbriankchan committed 8 years ago
Unverified
f3d6ae325c65ead7881523e855d9dd757612dae4

Actually add conv char classifier

MMichael0x2a committed 8 years ago
Unverified
5b50e066d9ca8bbcee662b5818d66269918e6ae0

Merge branch 'master' of github.com:Michael0x2a/nlp-capstone

MMichael0x2a committed 8 years ago
Unverified
c189998e5aae0d463ad0463e9d5fc8861b5b32dd

Add conv char to cmd.py

MMichael0x2a committed 8 years ago

README

The README file for this repository.

nlp-capstone

Setup

This project is designed to use Python 3.5, specifically (Tensorflow isn't yet compatible with Python 3.6+).

Installation:

python3.5 -m pip install -r requirements.txt

Note: when running code, you should be within the abuse folder.

Useful utilities:

To run the cmd line tool:

Run:

python3.5 cmd.py [dataset-name] [dataset-params] [model-name] [model-parms]

The params will be forwarded directly as arguments into the dataset and model names respectively.

The params must be in the form:

--param_name arg

The types of the args are automatically inferred.

So for example, to run the RNN model using the wikipedia dataset (specifically, the toxicity dataset), setting the number of epoches to 7 and all other params the same as the default, you would run:

python3.5 cmd.py wikipedia --category toxicity rnn --epoch 7

Regenerating json data caches

To regenerate the cached data json files for a particular data type:

python3.5 -m data_extraction.[dataset_name].parsing

For example, to regenerate the wikipedia data, run:

python3.5 -m data_extraction.wikipedia.parsing

Typechecking

Run:

mypy [path-to-file.py]

To typecheck the entire project, run:

mypy ../abuse

...which is a bit of a hack, but whatever.