crazyfrogspb / redditscore Goto Github PK
View Code? Open in Web Editor NEWPackage for performing Reddit-based text analysis
License: MIT License
Package for performing Reddit-based text analysis
License: MIT License
from redditscore.tokenizer import CrazyTokenizer
tokenizer = CrazyTokenizer(hashtags='split')
tokenizer.tokenize("#20yearsago")
['2', '0', 'y', 'e', 'a', 'r', 's', 'a', 'g', 'o']
['20', 'years', 'ago']
With the CrazyTokenizer (excellent results, btw, thanks!) I am running into an issue with a maximum character length for SpaCY: "[E088] Text of length 3029371 exceeds maximum of 1000000."
You can change nlp.max_length
, but for that you have to load spacy itself.
Is there a way that nlp.max_length can be set. when loading the CrazyTokenizer?
(I know I could simply cut the file in 3, but I'd rather avoid that as I'd have to manually stitch the resulting token set back together again and I'll have to do this for various files).
There used to be no problems when importing CrazyTokenizer in Colab until February, but now it throws an error of "Protocol not found".
To reproduce errors, Type:
!pip install git+https://github.com/crazyfrogspb/RedditScore.git
from redditscore.tokenizer import CrazyTokenizer
Maybe it's because of some updates made? Is there any way to downgrade the version when installing?
pip install git+https://github.com/crazyfrogspb/RedditScore.git
from redditscore.tokenizer import CrazyTokenizer
tokenizer = CrazyTokenizer(hashtags=False)
text = "Let's #makeamericagreatagain#americafirst"
print(tokenizer.tokenize(text))
["let's", "#makeamericagreatagain", "#americafirst"]
['let', "'s", '#makeamericagreatagain', '#americafirst']
Kaggle's Notebook
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.