ejhfast / empath-client Goto Github PK
View Code? Open in Web Editor NEWanalyze text with empath
License: MIT License
analyze text with empath
License: MIT License
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.
Hi
I would like to know if it is possible to create a word dictionary in another language.
I am looking for portuguese dictionary at the moment.
Best regards
Ezequias Rocha
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
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!
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!
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.
If I try using Empath, it now says:
<title>500 Internal Server Error</title>Hi,
the link to your paper is down:
http://hci.stanford.edu/publications/empath-chi-2016.pdf
Regards
Matthias
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)
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
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!
Is it possible to add a word to a category?
For example, I want to add "batleth" in "weapon" to analyse Star Trek scripts.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.