Coder Social home page Coder Social logo

textgain / grasp Goto Github PK

View Code? Open in Web Editor NEW
68.0 10.0 19.0 58.89 MB

Essential NLP & ML, short & fast pure Python code

License: BSD 3-Clause "New" or "Revised" License

JavaScript 2.66% Python 97.34%
machine-learning natural-language-processing explainable-ai perceptron naive-bayes decision-tree k-nearest-neighbors tokenizer part-of-speech-tagger sentiment-analysis

grasp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grasp's Issues

VERB being tagged as NOUN

In running a local test with some boilerplate text, I'm getting a result that isn't tagging the verb properly:

>>> parsed = list(parse("The quick brown fox jumps over the lazy dog."))
>>> parsed[0]
Sentence(u'The/DET quick/ADJ brown/ADJ fox/NOUN jumps/NOUN over/PREP the/DET lazy/ADJ dog/NOUN ./PUNC')

Note that if I change the verb to "jumped" it tags it correctly:

>>> parsed = list(parse("The quick brown fox jumped over the lazy dog."))
>>> parsed[0]
Sentence(u'The/DET quick/ADJ brown/ADJ fox/NOUN jumped/VERB over/PREP the/DET lazy/ADJ dog/NOUN ./PUNC')

Cloned the latest master, running on the following interpreter:

Python 2.7.12 (default, Oct 11 2016, 05:24:00)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin

Let me know if you need anything else!

-R

Error fid = open(os fspath(file), "rb")] on python3.5.0

Hello thank you for visitting my issue
I'm studying tensorflow by following "pygta5" on YouTube
I tried to run [balance_data.py](https://github.com/Sentdex/pygta5/tree/master/Tutorial%20Codes/Part%208-13%20code) file on both of "command prompt & IDLE"

Error on command prompt :

Traceback (most recent call last):
File "C:\Windows\System32\pygta5-master\Tutorial Codes\Part 8-13 code\balance_data.py", line 8, in
train_data = np.load('training_data.npy')
File "C:\Users\decax64\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\lib\npyio.py", line 415, in load
fid = open(os_fspath(file), "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'training_data.npy'

Error on IDLE (only the last 3 lines) :

File "C:\Users~\AppData\Local\Programs\Python\Python35\lib\shutil.py", line 1062, in get_terminal_size
size = os.get_terminal_size(sys.stdout.fileno())
AttributeError: 'NoneType' object has no attribute 'fileno'

I guess directory error
but doesnt work Even I copied training_data.npy file to /lib/ folder

Windows10
Python3.5.0
CPU:Xeon W3530 (similar to core i7 900)= neither AVX nor AVX2

The troublemaker file is : balance_data.py
My current step is :
https://www.youtube.com/watch?v=wIxUp-37jVY&list=PLQVvvaa0QuDeETZEOy4VdocT7TOjfSA8a&index=10

Regards...

Installation bug in setup.py?

Hi,
executing !python setup.py install in the directory where I cloned your https://github.com/vicru/grasp returns

warning: install_lib: 'build\lib' does not exist -- no Python modules to install zip_safe flag not set; analyzing archive contents...

Even though the above-mentioned execution also returns:

running install
running bdist_egg
running egg_info
writing Grasp.egg-info\PKG-INFO
writing dependency_links to Grasp.egg-info\dependency_links.txt
writing requirements to Grasp.egg-info\requires.txt
writing top-level names to Grasp.egg-info\top_level.txt
reading manifest file 'Grasp.egg-info\SOURCES.txt'
writing manifest file 'Grasp.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\EGG-INFO
copying Grasp.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying Grasp.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying Grasp.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying Grasp.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying Grasp.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
creating 'dist\Grasp-2.0-py3.8.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing Grasp-2.0-py3.8.egg
Removing c:\users\drcrac\anaconda3\lib\site-packages\Grasp-2.0-py3.8.egg
Copying Grasp-2.0-py3.8.egg to c:\users\drcrac\anaconda3\lib\site-packages
Grasp 2.0 is already the active version in easy-install.pth
Installed c:\users\drcrac\anaconda3\lib\site-packages\grasp-2.0-py3.8.egg
Processing dependencies for Grasp==2.0
Finished processing dependencies for Grasp==2.0

when I execute from grasp import download the following error shows up

ImportError: cannot import name 'download' from 'grasp' (C:\Users\drcrac\anaconda3\lib\site-packages\grasp_init_.py)

Which makes believe that I am doing something wrong with my installation method. I would highly appreciate some feedback in this respect. I couldn't find your library on pip, that is why I tried the above mentioned installation. By the way, my goal is to execute your Proof-of-concept https://gist.github.com/tom-de-smedt/9c9d9b9168ba703e0c336ee0128ebae5

URL wrapped in parentheses is not being tokenized properly

Hi there! In some use case testing, I discovered the following behavior:

>>> tokenize("(http://google.com)")
'( http://google.com)'

It looks like the tokens() rule that fires for closing parens occurs after the URL token rule, so the closing paren doesn't get split out as a separate token:

        if w.startswith('('):                                        # (http://
            return '( ' + tokens(w[1:])
        if re.search(r'^https?://', w):                              # http://
            return w
        if re.search(r'[^:;-][),:]$', w):                            # U.S.,
            return tokens(w[:-1]) + ' ' + w[-1]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.