You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiangrui Meng (JIRA)" <ji...@apache.org> on 2015/06/18 23:10:01 UTC

[jira] [Commented] (SPARK-8455) Implement N-Gram Feature Transformer

    [ https://issues.apache.org/jira/browse/SPARK-8455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14592508#comment-14592508 ] 

Xiangrui Meng commented on SPARK-8455:
--------------------------------------

It might be simpler if the output type is an array of strings, e.g., ["this is", "is a", "a test"], instead of array of string arrays. After NGram, it is easier for users to vectorize the output.

> Implement N-Gram Feature Transformer
> ------------------------------------
>
>                 Key: SPARK-8455
>                 URL: https://issues.apache.org/jira/browse/SPARK-8455
>             Project: Spark
>          Issue Type: New Feature
>          Components: ML
>            Reporter: Feynman Liang
>            Priority: Trivial
>
> N-grams are a NLP feature representation which generalize bag of words to include local context (the n-1 preceding words). We can implement N-grams in ML as a feature transformer (likely directly after tokenization).
> For example, "this is a test" should tokenize to ["this","is","a","test"], which upon applying a 2-gram feature transform should yield [["this","is"],["is","a"],["a","test"]].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org