classifying-text | Classifying text with bag-of-words | Natural Language Processing library
kandi X-RAY | classifying-text Summary
kandi X-RAY | classifying-text Summary
Classifying text with bag-of-words
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Split a review string into sentences
- Convert a review text to a list of words
classifying-text Key Features
classifying-text Examples and Code Snippets
Community Discussions
Trending Discussions on classifying-text
QUESTION
According to this documentation: the classifyText method requires at least 20 words.
https://cloud.google.com/natural-language/docs/classifying-text#language-classify-content-nodejs
If I send in less than 20 words I get this no matter how clear the content is:
...ANSWER
Answered 2021-May-26 at 09:59The problem with this is you're adding bias no matter what kind of text you send.
Your only chance is to fill up your string up to the minimum word limit with empty words that will be filtered out by the preprocessor and tokenizer before they go to the neural network.
I would try to add a string suffix at the end of the sentence with just stopwords from NLTK like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install classifying-text
You can use classifying-text like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page