hivemall-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From takuti <...@git.apache.org>
Subject [GitHub] incubator-hivemall pull request #97: [HIVEMALL-130] Support user-defined dic...
Date Tue, 11 Jul 2017 09:10:53 GMT
Github user takuti commented on a diff in the pull request:

    https://github.com/apache/incubator-hivemall/pull/97#discussion_r126635120
  
    --- Diff: nlp/src/test/java/hivemall/nlp/tokenizer/KuromojiUDFTest.java ---
    @@ -192,6 +241,126 @@ public void prepare(int arg) throws HiveException {}
         }
     
         @Test
    +    public void testEvaluateUserDictArray() throws IOException, HiveException {
    +        KuromojiUDF udf = new KuromojiUDF();
    +        ObjectInspector[] argOIs = new ObjectInspector[5];
    +        // line
    +        argOIs[0] = PrimitiveObjectInspectorFactory.writableStringObjectInspector;
    +        // mode
    +        PrimitiveTypeInfo stringType = new PrimitiveTypeInfo();
    +        stringType.setTypeName("string");
    +        argOIs[1] = PrimitiveObjectInspectorFactory.getPrimitiveWritableConstantObjectInspector(
    +            stringType, null);
    +        // stopWords
    +        argOIs[2] = ObjectInspectorFactory.getStandardConstantListObjectInspector(
    +            PrimitiveObjectInspectorFactory.writableStringObjectInspector, null);
    +        // stopTags
    +        argOIs[3] = ObjectInspectorFactory.getStandardConstantListObjectInspector(
    +            PrimitiveObjectInspectorFactory.writableStringObjectInspector, null);
    +        // userDictArray (from https://raw.githubusercontent.com/atilika/kuromoji/909fd6b32bf4e9dc86b7599de5c9b50ca8f004a1/kuromoji-core/src/test/resources/userdict.txt)
    +        List<String> userDict = new ArrayList<String>();
    +        userDict.add("日本経済新聞,日本 経済 新聞,ニホン ケイザイ
シンブン,カスタム名詞");
    +        argOIs[4] = argOIs[2] = ObjectInspectorFactory.getStandardConstantListObjectInspector(
    --- End diff --
    
    Wrong assignment


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message