The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Text Pre-processing
Hi there
I am trying to do some preprocessing on text and looking for the relevant operators in RapidMiner, if they are indeed available.
I am extracting features from a sentence, using Information Gain operator. This seems to be possible. From there, I need to construct a feature vector using Bag of Words (BOW) and Term Frequency (TF). I should end up with a vector of unigrams. I want this vector of unigrams to be based on Part of Speech (POS) for each term in the sentence.
The operators I am looking for are:
1. BOW;
2. TF;
3. PoS tagging.
Are these available in RapidMiner or am I looking in the wrong operator directories?
Thanks
I am trying to do some preprocessing on text and looking for the relevant operators in RapidMiner, if they are indeed available.
I am extracting features from a sentence, using Information Gain operator. This seems to be possible. From there, I need to construct a feature vector using Bag of Words (BOW) and Term Frequency (TF). I should end up with a vector of unigrams. I want this vector of unigrams to be based on Part of Speech (POS) for each term in the sentence.
The operators I am looking for are:
1. BOW;
2. TF;
3. PoS tagging.
Are these available in RapidMiner or am I looking in the wrong operator directories?
Thanks
Tagged:
0
Best Answers
-
Pavithra_Rao Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 123 RM Data ScientistHi @Hyram,
Text processing extension could help you out with text mining feature extraction and processing.
Also here's some good resource to help you get started with RM Text processing
https://academy.rapidminer.com/learn/course/text-and-web-mining-with-rapidminer/text-and-web-mining/lets-get-started
https://rapidminer.com/resource/text-mining-document-classification/
https://rapidminer.com/resource/text-mining-document-classification/
Cheers,
Pavithra
1 -
Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 UnicornYou need to download and install the free text mining extension from the marketplace.
The operator "Process Documents" will generate a word vector using term frequency if you set that as the option in the parameters (TF-IDF is the default), and it will also automatically generate the bag of words for you if you use the Tokenize operator inside and then output the wordlist and the exampleset (depending on the format you want it in).
There is also an operator for "Filter Tokens (by POS Tags)" but I am not sure if you can get it to actually output the POS tag, or whether you can only filter by the tags (in which case I guess you could add them manually based on the filtered results? but that seems inefficient).
@mschmitz is there any way to output the POS tag directly?1 -
MartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientisti think this can only filter, but i haven't used this in a while. Maybe the wordnet extension can help?BR,Martin- Sr. Director Data Solutions, Altair RapidMiner -
Dortmund, Germany5 -
Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 UnicornYes the values in the word vector correspond to the TF-IDF values calculated across the exampleset.1
Answers
Brian has answered my question perfectly. The only issue outstanding is how I use PoS tagging. Can I reflect the tags or only filter by them?
Thanks
I have one more question @mschmitz. How would I remove hashtags and URLs from my text? What operator would I use? Replace? I've looked at the previous posts around this and the tutorial which a community member suggested I look at, no longer exists.
Thanks
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts
Just need to sort out URLs now. Filter Tokens using 'non-letter', seems to sort out # but not the test immediately after, as you've suggested. At least now I know that I need to look for regular expressions.
Thanks again!