Comments (5)
Hey @bdewilde, great - thanks very much for the clarification. I can switch to the master branch for the time-being whilst waiting for the new release. Feel free to close this one out! I'll let you know if I spot anything else. Also, I may have some enhancement ideas further down the line. Once again, great library!
from textacy.
Sounds good. I'm open to feature requests — and PRs! :)
from textacy.
Hi @covuworie , you're describing some recent changes to string normalization that are currently in the master branch on github but have not yet been released — textacy
v0.3.2 does not have them. So, if you're using v0.3.2 as you wrote, then you wouldn't see the deprecation messages and changed behavior.
If, instead, you're using the latest version in master, then maybe there's a bug — but I don't see it. That said, I think you've misinterpreted what passing a callable in for the normalize
param does: it operates on a per-token or per-span basis, converting the objects into a string representation as desired. So, maybe you want all terms uppercased rather than lowercased, or you want to stem them rather than lemmatize. Also, lemmatization typically involves lowercasing, while lowercasing does not involve lemmatization.
Let me know if you're using v0.3.2 or the latest in master, and if what I wrote above clarifies your expectations.
from textacy.
Hi @bdewilde, thanks very much for the prompt and clear explanation. I was using the textacy 0.3.2
release. I checked the latest code of doc in master and can see the deprecation messages.
I do not think I misinterpreted the purpose of passing a callable to the normalize
param. I read the spaCy documentation for Span which says it's a slice from a Doc object. My docs just happen to be very small and the Span is in fact the whole document! As you said, I expected to be able to use the callable to convert the Span (i.e. the whole Doc) into the string representation I desired. I guess this is what line 489 in doc in master is meant to do? Does textacy 0.3.2
have the same line of code or is it only in master?
from textacy.
Hey @covuworie , glad we sorted that out — sorry about the confusion! v0.3.2 doesn't let you pass in a callable to the normalize
param (which doesn't exist anyway, I suppose), so unless you want to switch to the master branch on github, you're stuck with lemmatize=True
or lowercase=True
, for now. I'll put out a new textacy
release as soon as I have a bit more to include, hopefully by end of January. I've been sidetracked doing PRs on someone else's open-source project... :)
Is there still an unresolved issue, or can I close this out?
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.