Comments (3)
I modified spacy_utils.py line 84 with
return (token.text if preserve_case(token) else token.lemma_).encode('ascii', 'ignore')
and its working.
from textacy.
@pklalitjha Well, shoot. I've been developing textacy
entirely in Python 3.5, but trying to maintain Python 2.7 compatibility. It seems I've failed. str
is unicode
in Python 3, but not 2. 😩 Your hack is a fine band-aid for now, but I'll prioritize ensuring Py2/3 compatibility everywhere, not to mention adding tests for the keyterms module and running all tests in both Python 2 and 3.
Sorry about the trouble! You're my first GitHub issue on textacy
— finally feels like an open-source project.
from textacy.
@pklalitjha I've pushed some changes to master that should fix your Py2 str issue. There may be other Py2/3 compatibility issues I've not found -- please holler if you run into anything!
from textacy.
Related Issues (20)
- AttributeError: module 'textacy' has no attribute 'tm' HOT 1
- UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in Concept HOT 2
- GHSL-2021-109 HOT 1
- ImportError: cannot import name 'keyterms' HOT 1
- Installing textacy on Python 3.6 downgrades the packages HOT 1
- Method to retrieve all words in ConceptNet HOT 1
- normalize_hyphenated_words() not working in version 0.11.0 HOT 1
- Can't Load Russian Language Model due to Caching Bug HOT 4
- Missing SVOTriple returned from subject_verb_object_triples(doc) ? HOT 1
- Missing ARM64 build on conda HOT 2
- most_discriminating_terms no longer available HOT 2
- Why `normalize.hyphenated_words` is not able to reassemble all words separated by a line break? HOT 2
- ERROR: Failed building wheel for pyemd during installation HOT 1
- Incompatible with NetworkX 3.0 HOT 6
- Updating triples.py to rely on spacy-wordnet and sense tagging
- vectorizer = TfidfVectorizer(tokenizer=createTokens) HOT 5
- readthedocs site still has 0.11.0 documentation HOT 2
- Improve quotation detection by parsing quotation mark types
- Quotes - Is there a way to include these additional patterns?
- to_bag_of_terms kwargs like to_bag_of_words
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textacy.