spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yuhao yang (JIRA)" <>
Subject [jira] [Commented] (SPARK-8169) Add StopWordsRemover as a transformer
Date Tue, 09 Jun 2015 06:59:00 GMT


yuhao yang commented on SPARK-8169:

This looks useful. I'd like to give it a try if no one has started on this. And I think there
could be more transformers regarding to text pre-processing. Like the text vectorization in
LDA example and low-frequency filter. 
Some rough ideas:
The default stop words will probably contains English only, yet the StopWordsRemover should
support ASCII.
Case sensitivity will be a parameter.

Let me know if I'm missing some requirement.

> Add StopWordsRemover as a transformer
> -------------------------------------
>                 Key: SPARK-8169
>                 URL:
>             Project: Spark
>          Issue Type: New Feature
>          Components: ML
>    Affects Versions: 1.5.0
>            Reporter: Xiangrui Meng
> StopWordsRemover takes a string array column and outputs a string array column with all
defined stop words removed. The transformer should also come with a standard set of stop words
as default.
> {code}
> val stopWords = new StopWordsRemover()
>   .setInputCol("words")
>   .setOutputCol("cleanWords")
>   .setStopWords(Array(...)) // optional
> val output = stopWords.transform(df)
> {code}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message