spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Pentreath (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-19668) Multiple NGram sizes
Date Thu, 23 Feb 2017 08:51:44 GMT

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

Nick Pentreath commented on SPARK-19668:
----------------------------------------

The simplest will be to keep the existing param and make it the max of the range (since that
keeps with the existing semantics), and add a new param to specify the start of the range.

However we need to be careful about backward compat for save/load. If an older model is loaded,
then the two params should be set to the same value. I think it would be sufficient to check
if the new param is missing and if so set it to the value of the existing param. Make sense?

> Multiple NGram sizes
> --------------------
>
>                 Key: SPARK-19668
>                 URL: https://issues.apache.org/jira/browse/SPARK-19668
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>    Affects Versions: 2.1.0
>            Reporter: Jacek KK
>            Priority: Minor
>              Labels: beginner, easyfix, newbie
>
> It would be nice to have a possibility of specyfing the range (or maybe a list of) sizes
of ngrams, like it is done in sklearn, as in 
> http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html#sklearn.feature_extraction.text.TfidfVectorizer
> This shouldn't be difficult to add, the code is very straightforward, and I can implement
it. The only issue is with the NGram API - should it just accept a number/tuple/list?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message