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 [email protected] or file a JIRA ticket
with INFRA.
---