Skip to content

Commit

Permalink
#51
Browse files Browse the repository at this point in the history
- text features dict
- feat extraction
- bash update (spacy models)
  • Loading branch information
diegoesteves committed Apr 30, 2020
1 parent d6b6f2d commit 6e4ef68
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 65 deletions.
151 changes: 151 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
absl-py==0.9.0
appnope==0.1.0
asgiref==3.2.7
astor==0.8.1
async-generator==1.10
attrs==19.3.0
backcall==0.1.0
bleach==3.1.0
blis==0.4.1
boto==2.49.0
boto3==1.12.49
botocore==1.15.49
cachetools==4.1.0
catalogue==1.0.0
certifi==2019.9.11
chardet==3.0.4
colorama==0.4.3
configparser==5.0.0
crayons==0.3.0
cycler==0.10.0
cymem==2.0.3
decorator==4.4.1
defusedxml==0.6.0
Django==3.0.5
dlib==19.19.0
docutils==0.15.2
eli5==0.10.1
entrypoints==0.3
fastscript==0.1.4
gast==0.2.2
gensim==3.8.2
google-api-core==1.17.0
google-auth==1.14.0
google-auth-oauthlib==0.4.1
google-cloud-bigquery==1.24.0
google-cloud-core==1.3.0
google-pasta==0.2.0
google-resumable-media==0.5.0
googleapis-common-protos==1.51.0
graphviz==0.13.2
grpcio==1.28.1
h5py==2.10.0
idna==2.9
imageio==2.8.0
importlib-metadata==0.23
ipykernel==5.1.3
ipython==7.9.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
jedi==0.15.1
Jinja2==2.10.3
jmespath==0.9.5
joblib==0.14.1
json5==0.9.4
jsonpickle==1.3
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==5.3.4
jupyter-console==6.0.0
jupyter-core==4.6.1
jupyter-server==0.1.1
jupyterlab==2.1.0
jupyterlab-pygments==0.1.0
jupyterlab-server==1.1.1
Keras==2.3.1
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.2.0
Markdown==3.2.1
MarkupSafe==1.1.1
matplotlib==3.2.1
mistune==0.8.4
more-itertools==7.2.0
murmurhash==1.0.2
nbconvert==5.6.1
nbformat==4.4.0
networkx==2.4
nltk==3.4.5
notebook==6.0.2
numpy==1.18.2
oauthlib==3.1.0
opencv-contrib-python==4.2.0.34
opencv-python==4.2.0.34
opt-einsum==3.2.1
packaging==20.3
pandas==1.0.3
pandas-gbq==0.13.1
pandocfilters==1.4.2
parso==0.5.1
pexpect==4.7.0
pickleshare==0.7.5
Pillow==7.1.2
pipenv==2018.11.26
plac==1.1.3
preshed==3.0.2
prometheus-client==0.7.1
prompt-toolkit==2.0.10
protobuf==3.11.3
ptyprocess==0.6.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pydata-google-auth==1.0.0
pyfiglet==0.8.post1
Pygments==2.4.2
pyparsing==2.4.7
pyrsistent==0.15.5
python-crfsuite==0.9.7
python-dateutil==2.8.1
pytz==2019.3
PyWavelets==1.1.1
PyYAML==5.3.1
pyzmq==18.1.1
qtconsole==4.6.0
QtPy==1.9.0
requests==2.23.0
requests-oauthlib==1.3.0
rsa==4.0
s3transfer==0.3.3
scikit-image==0.16.2
scikit-learn==0.22.2.post1
scipy==1.4.1
Send2Trash==1.5.0
six==1.13.0
sklearn==0.0
sklearn-crfsuite==0.3.6
smart-open==2.0.0
spacy==2.2.4
sqlparse==0.3.1
srsly==1.0.2
tabulate==0.8.7
tensorboard==2.1.1
tensorflow==2.1.0
tensorflow-estimator==2.1.0
termcolor==1.1.0
terminado==0.8.3
testpath==0.4.4
thinc==7.4.0
tornado==6.0.3
tqdm==4.44.1
traitlets==4.3.3
urllib3==1.25.9
virtualenv==16.7.5
virtualenv-clone==0.5.3
voila==0.1.21
wasabi==0.6.0
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==1.0.1
widgetsnbextension==3.5.1
wrapt==1.12.1
zipp==0.6.0
57 changes: 0 additions & 57 deletions scripts/00_initialize.py

This file was deleted.

2 changes: 2 additions & 0 deletions scripts/00_initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,6 @@ pipenv run python ./00_initialize.py

pipenv run python /Users/diego.esteves/git/horus-ner/src/utils/CMUTweetTagger.py

python -m spacy download en_core_web_sm

echo "end bash ok"
5 changes: 3 additions & 2 deletions src/algorithms/computer_vision/cnnlogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import torch
import torch.nn as nn
from torch.autograd import Variable
from src.classifiers.computer_vision.places365 import Places365CV
from src.config import HorusConfig

from config import HorusConfig
from src.algorithms.computer_vision.places365 import Places365CV
#import PIL
#from PIL import Image

Expand Down
2 changes: 1 addition & 1 deletion src/algorithms/computer_vision/places365.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os
from PIL import Image

from src.config import HorusConfig
from config import HorusConfig


class Places365CV():
Expand Down
10 changes: 5 additions & 5 deletions src/algorithms/text_classification/topic_modeling_short_cnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
import en_core_web_sm
import os
import shorttext
from src.config import HorusConfig
import tensorflow as tf

from src.util.nlp_tools import NLPTools
from config import HorusConfig
from src.utils.nlp_tools import NLPTools

os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
nlp = en_core_web_sm.load()
#spacy.load('en')

class TopicModelingShortCNN():

class TopicModelingShortCNN(object):

def __init__(self, config, w2v, mode='test'):
try:
self.config = config
Expand Down Expand Up @@ -110,7 +111,6 @@ def train(self, epochs=5000):
topic = TopicModelingShortCNN(config, tools.word2vec_google, mode='test')
#topic.train()


print(topic.predict('orlando'))
print(topic.predict('river'))
print(topic.predict('chile'))
Expand Down

0 comments on commit 6e4ef68

Please sign in to comment.