language filter issue

winecoding
winecoding New Altair Community Member
edited November 5 in Community Q&A
I have a document that include both chinese and english. Can I filter all those english text and keep chinese text only? Or in the other direction, can I filter all those chinese text and keep english text only?
Tagged:

Answers

  • JEdward
    JEdward New Altair Community Member

    Just saw this one.  Yes you can, simply use a regular expression in your filter and search for \p{Han} this only selects Chinese characters. 

    To get the reverse just invert it. 

  • LaurenPlummer
    LaurenPlummer New Altair Community Member

    Btw, my team has released a RapidMiner extension to perform multilingual text analysis - the Rosette Text Toolkit. We have an "Identify Language" operator that returns the language of every cell in the input attribute (identifies 56 languages, including Chinese). The extension may help in analyzing multiple-language input - and most of our operators support Chinese.

     

    -Lauren

     

  • masirumi
    masirumi New Altair Community Member
    I have tried using Rosette's Identify Language operator but received "Couldn't retrieve data for input text" error message. Have tried with text produced from RapidMiner's Generate Nominal Example and other datasets but to no avail.

    Hope Rosette could fix this soon.

    Rumi