wse-research / linguaf Goto Github PK
View Code? Open in Web Editor NEWpython package for calculating famous measures in computational linguistics
License: MIT License
python package for calculating famous measures in computational linguistics
License: MIT License
Rename words_per_sentence
to avg_words_per_sentence
Hi! I've installing the library by using pip, but I'm getting an error when trying to use the example in the readme, I'm trying to run:
from linguaf import descriptive_statistics as ds
documents = [
"Pain and suffering are always inevitable for a large intelligence and a deep heart. The really great men must, I think, have great sadness on earth.",
"To go wrong in one's own way is better than to go right in someone else's.",
"The darker the night, the brighter the stars, The deeper the grief, the closer is God!"
]
print(ds.words_per_sentence(documents))
and I get:
Traceback (most recent call last):
File "x.py", line 1, in <module>
from linguaf import descriptive_statistics as ds
File "C:\Users\javi\anaconda3\lib\site-packages\linguaf\descriptive_statistics.py", line 26, in <module>
STOPWORDS[language] = __load_json(
File "C:\Users\javi\anaconda3\lib\site-packages\linguaf\__init__.py", line 10, in __load_json
data = json.load(f)
File "C:\Users\javi\anaconda3\lib\json\__init__.py", line 293, in load
return loads(fp.read(),
File "C:\Users\javi\anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 98: character maps to <undefined>
I've tried to install the package from github too and got the same result, can you give me a hand?
1. remove_punctuation
2. remove_digits
3. .split()
Rename file to syntactical_complexity.py
Remove multiplication by 100 where it is not present in the original formula
I think it'd be a helpful addition to have methods that confirm if input strings are actual complete sentences or not / find those in a given text or something similar.
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.