Coder Social home page Coder Social logo

empath-client's People

Contributors

ejhfast avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

empath-client's Issues

ImportError when importing empath

as per the README:

from empath import Empath
lexicon = Empath()

doing this gives the error:

Traceback (most recent call last):
  File "empath.py", line 1, in <module>
    from empath import Empath
  File "[file-path-of-the-python-file]", line 1, in <module>
    from empath import Empath
ImportError: cannot import name 'Empath' from 'empath' ([file-path-of-the-python-file]

also tried:

import empath
lexicon = empath.Empath()

which gives the error:

AttributeError: module 'empath' has no attribute 'Empath'

any insights on how to navigate around this? seeing this on both python 2 and 3.

Stemming or Lemmatize?

Hi, Is there a way to incorporate stemming or lemmatization? The problem is, for example, while the word 'help' in a text gets counted towards category help, the words helping and helped do not.

Any way this can be achieved with Empath?

Thanks
SBS

Documentation on creating a backend

It appears that creating a category requires an external call to a backend server which then returns results for the creating of that category. If I were running the empath client behind a firewall, this would be an issue. Is there documentation on standing up a backend server to handle those requests?

Thanks!

Problem in creating new category

Hi, I am having a problem to create a new category. This is the error I got.

requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='54.148.189.209', port=8000): Max retries exceeded with url: /create_category (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x131887070>, 'Connection to 54.148.189.209 timed out. (connect timeout=None)'))

Thank you!

Categories have some questionable words

For example, the category death has... brother, wife, son and other members of family. I understand that there are some loose collocations between death and those words, but think about this: if a written text happened to contain a lot of joyous mentions of family members, it'd rate high in the "death" category! Other words that should be considered for removal from the death category is "sadly", "pray", "life", "ultimatum", and words relating to negative emotions (their presence doesn't necessitate death; besides there is already a category for negative emotions).

That is for the death category alone. How many categories include how many inappropriate words?

I think this is potentially a very useful tool and a fantastic start, but I wouldn't trust it to give accurate readings as it is now.

Thank you for reading and your consideration.

Internal Server Error

If I try using Empath, it now says:

<title>500 Internal Server Error</title>

500 Internal Server Error

Server got itself in trouble

On some string empath is not working

Empath is a really good library.But on some text there are no categories everything is zero.
Example is given below.Please check
l=lexicon.analyze('the resolution has been duly moved and seconded. i shall put it to the vote now.',normalize=True)

Speeding up processing

I have a dataframe with 230000 rows and when I apply the empath lexicon it s taking a while to process.
What is the best way to speed it up?

The main operation I have looks like:

from empath import Empath
emp = Empath()
analyze = lru_cache(maxsize=50000)(emp.analyze)
all_posts['empath'] = all_posts.content.apply(lambda x: list(analyze(' '.join(x)).values()))

Where all_posts.content is a series of token lists

Keep getting error while creating category

I keep getting an error everytime I try to create a category.
Python commands I used are as `follows:

from empath import Empath
lexicon = Empath()
lexicon.create_category("cold_war", ["cold_war"], model="nytimes")

The error I got is as follows:

requests.exceptions.ConnectionError: HTTPConnectionPool(host='54.148.189.209', port=8000): Max retries exceeded with url: /create_category (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x102fed1d0>: Failed to establish a new connection: [Errno 61] Connection refused',))

Thanks!

Add word to category

Is it possible to add a word to a category?
For example, I want to add "batleth" in "weapon" to analyse Star Trek scripts.

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.