Closed William-Yeh closed 10 years ago
--skiptest 我那个test和本地文件路径写死造成的
于 2014年07月14日 18:07, William Yeh 写道:
$ java -version java version "1.8.0_05" Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
$ mvn compile OK.
$ mvn test: FAILED; see below.
INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.nlpcn:nlp-lang:jar:0.2 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 78, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO]
[INFO]
[INFO] Building nlp-lang 0.2
[INFO]
[INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ nlp-lang --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ nlp-lang --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ nlp-lang --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/william/Documents/AtWork/github/nlp-lang/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ nlp-lang --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ nlp-lang --- [INFO] Surefire report directory: /Users/william/Documents/AtWork/github/nlp-lang/target/surefire-reports
T E S T S
Running org.nlpcn.commons.lang.dat.DATMakerTest Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.106 sec <<< FAILURE! test(org.nlpcn.commons.lang.dat.DATMakerTest) Time elapsed: 0.043 sec <<< ERROR! java.lang.NullPointerException at org.nlpcn.commons.lang.dat.DATMaker.maker(DATMaker.java:76) at org.nlpcn.commons.lang.dat.DATMakerTest.test(DATMakerTest.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
loadTest(org.nlpcn.commons.lang.dat.DATMakerTest) Time elapsed: 0.007 sec <<< ERROR! java.io.FileNotFoundException: 生成模型的路径 (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:131) at java.io.FileInputStream.(FileInputStream.java:87) at org.nlpcn.commons.lang.dat.DoubleArrayTire.load(DoubleArrayTire.java:31) at org.nlpcn.commons.lang.dat.DATMakerTest.loadTest(DATMakerTest.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Running org.nlpcn.commons.lang.dat.DATTest Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.051 sec <<< FAILURE! loadTextTest(org.nlpcn.commons.lang.dat.DATTest) Time elapsed: 0.012 sec <<< ERROR! java.lang.NullPointerException at java.io.Reader.(Reader.java:78) at java.io.InputStreamReader.(InputStreamReader.java:97) at org.nlpcn.commons.lang.util.IOUtil.getReader(IOUtil.java:63) at org.nlpcn.commons.lang.util.FileIterator.(FileIterator.java:24) at org.nlpcn.commons.lang.util.IOUtil.instanceFileIterator(IOUtil.java:200) at org.nlpcn.commons.lang.dat.DoubleArrayTire.loadText(DoubleArrayTire.java:70) at org.nlpcn.commons.lang.dat.DoubleArrayTire.loadText(DoubleArrayTire.java:57) at org.nlpcn.commons.lang.dat.DoubleArrayTire.loadText(DoubleArrayTire.java:93) at org.nlpcn.commons.lang.dat.DATTest.loadTextTest(DATTest.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
loadTest(org.nlpcn.commons.lang.dat.DATTest) Time elapsed: 0.016 sec <<< ERROR! java.io.FileNotFoundException: /home/ansj/公共的/pinyin.obj (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:131) at java.io.FileInputStream.(FileInputStream.java:87) at org.nlpcn.commons.lang.dat.DoubleArrayTire.load(DoubleArrayTire.java:31) at org.nlpcn.commons.lang.dat.DATTest.loadTest(DATTest.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
makerTest(org.nlpcn.commons.lang.dat.DATTest) Time elapsed: 0.02 sec <<< ERROR! java.lang.NullPointerException at org.nlpcn.commons.lang.dat.DATMaker.maker(DATMaker.java:76) at org.nlpcn.commons.lang.dat.DATMaker.maker(DATMaker.java:48) at org.nlpcn.commons.lang.dat.DATTest.makerTest(DATTest.java:11) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Running org.nlpcn.commons.lang.finger.FingerprintServiceTest 76cebd01faa63f38b45ea9756d26872c 76cebd01faa63f38b45ea9756d26872c Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec Running org.nlpcn.commons.lang.index.MemoryIndexTest [中国] [中国] [中国] [中国] init ok use time 547 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.538 sec Running org.nlpcn.commons.lang.jianfan.JianFanTest 草莓是红色的 士多啤棃是紅色的 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec Running org.nlpcn.commons.lang.pinyin.PinyinTest [ma3, wan2, dai4, ma3, ,, ta1, qi3, shen1, guan1, shang4, dian4, nao3, ,, yong4, gun3, tang4, de5, kai1, shui3, wei2, zi4, ji3, pao4, zhi4, yi1, wan3, teng2, zhe5, re4, qi4, de5, lao3, tan2, suan1, cai4, mian4, 。, zhong1, guo2, de5, cheng2, xu4, yuan2, geng4, pian1, ai4, la1, shang4, chuang1, lian2, ,, zai4, hei1, an4, zhong1, xiang3, shou4, zhei4, du2, te4, de, mei3, shi2, 。, zhei4, shi4, xian4, dai4, gong1, ye4, ji3, yi1, tian1, xin1, ku3, lao2, zuo4, de5, ren2, zui4, hao3, de5, kui4, zeng4, 。, nan2, fang1, yi1, dai4, sheng1, chang2, de5, cheng2, xu4, yuan2, sui1, ran2, zai4, jing1, cheng2, duo1, nian2, ,, dan4, reng2, kou3, wei4, qing1, dan4, ,, ta1, men2, wang3, wang3, bu4, jia1, liao4, bao1, ,, you2, lian3, jia2, zi4, ran2, tang3, xia4, de, re4, lei4, bu3, chong1, qia4, dang1, de5, yan2, fen1, 。, ta1, men2, xiang1, xin4, ,, yong4, zhei4, zhong3, fang1, shi4, ,, neng2, gou4, mo3, ping2, si1, kao3, zhe5, xian4, zai4, shi4, bu4, shi4, guo4, qu4, xiang3, yao4, de5, wei4, lai2, er2, dai4, lai2, de5, da4, bu4, fen1, you1, shang1, …, xiao3, li3, de5, fu4, qin1, zai4, nian2, qing1, de5, shi2, hou4, ye3, shi4, cong2, ye2, ye2, shou3, li3, jie1, shou1, le5, zu3, chuan2, de5, dai4, ma3, ,, bu4, guo4, ling4, ren2, jing1, ya4, de, shi4, ,, dao4, le, xiao3, li3, zhei4, yi1, dai4, ,, hen3, duo1, dong1, xi1, dou1, yi2, shi1, le5, ,, dan4, shi4, cheng2, xu4, yuan2, ku3, bi1, de5, wei4, dao4, bao3, cun2, de, shi4, ru2, ci3, de5, wan2, zheng3, 。, , jiu4, zai4, 2, 4, xiao3, shi2, zhi1, qian2, ,, zui4, xin1, de5, xu1, qiu2, cong2, P, M, chu3, chuan2, lai2, ,, wei2, le, de2, dao4, zhei4, fen4, zi4, ran2, de5, kui4, zeng4, ,, ma3, nong2, men5, kai1, ji1, 、, xie3, ma3, 、, diao4, shi4, 、, zhong4, gou4, ,, si4, ji4, lun2, hui2, de5, deng3, dai4, huan4, lai2, zhei4, nan2, de2, de5, feng1, shou1, shi2, ke4, 。, ma3, nong2, zhi1, dao4, ,, xu1, qiu2, de, bao3, xian1, qi1, zhi1, you3, duan3, duan3, de5, liang3, tian1, ,, ma3, nong2, men5, yao4, yi3, zui4, kuai4, de5, su4, du4, dui4, dai4, ma3, jin4, xing2, jing1, zhi4, de5, jia1, gong1, ,, ren4, he2, yi1, ge4, xu1, qiu2, dou1, ke3, neng2, zai4, 2, 4, xiao3, shi2, zhi1, hou4, shi1, qu4, yuan2, ben3, de5, huo2, li4, ,, bian4, cheng2, yi1, wen2, bu4, zhi2, de5, la1, ji1, chuang4, yi4, 。] [ma, wan, dai, ma, ,, ta, qi, shen, guan, shang, dian, nao, ,, yong, gun, tang, de, kai, shui, wei, zi, ji, pao, zhi, yi, wan, teng, zhe, re, qi, de, lao, tan, suan, cai, mian, 。, zhong, guo, de, cheng, xu, yuan, geng, pian, ai, la, shang, chuang, lian, ,, zai, hei, an, zhong, xiang, shou, zhei, du, te, de, mei, shi, 。, zhei, shi, xian, dai, gong, ye, ji, yi, tian, xin, ku, lao, zuo, de, ren, zui, hao, de, kui, zeng, 。, nan, fang, yi, dai, sheng, chang, de, cheng, xu, yuan, sui, ran, zai, jing, cheng, duo, nian, ,, dan, reng, kou, wei, qing, dan, ,, ta, men, wang, wang, bu, jia, liao, bao, ,, you, lian, jia, zi, ran, tang, xia, de, re, lei, bu, chong, qia, dang, de, yan, fen, 。, ta, men, xiang, xin, ,, yong, zhei, zhong, fang, shi, ,, neng, gou, mo, ping, si, kao, zhe, xian, zai, shi, bu, shi, guo, qu, xiang, yao, de, wei, lai, er, dai, lai, de, da, bu, fen, you, shang, …, xiao, li, de, fu, qin, zai, nian, qing, de, shi, hou, ye, shi, cong, ye, ye, shou, li, jie, shou, le, zu, chuan, de, dai, ma, ,, bu, guo, ling, ren, jing, ya, de, shi, ,, dao, le, xiao, li, zhei, yi, dai, ,, hen, duo, dong, xi, dou, yi, shi, le, ,, dan, shi, cheng, xu, yuan, ku, bi, de, wei, dao, bao, cun, de, shi, ru, ci, de, wan, zheng, 。, , jiu, zai, 2, 4, xiao, shi, zhi, qian, ,, zui, xin, de, xu, qiu, cong, P, M, chu, chuan, lai, ,, wei, le, de, dao, zhei, fen, zi, ran, de, kui, zeng, ,, ma, nong, men, kai, ji, 、, xie, ma, 、, diao, shi, 、, zhong, gou, ,, si, ji, lun, hui, de, deng, dai, huan, lai, zhei, nan, de, de, feng, shou, shi, ke, 。, ma, nong, zhi, dao, ,, xu, qiu, de, bao, xian, qi, zhi, you, duan, duan, de, liang, tian, ,, ma, nong, men, yao, yi, zui, kuai, de, su, du, dui, dai, ma, jin, xing, jing, zhi, de, jia, gong, ,, ren, he, yi, ge, xu, qiu, dou, ke, neng, zai, 2, 4, xiao, shi, zhi, hou, shi, qu, yuan, ben, de, huo, li, ,, bian, cheng, yi, wen, bu, zhi, de, la, ji, chuang, yi, 。] [m, w, d, m, ,, t, q, s, g, s, d, n, ,, y, g, t, d, k, s, w, z, j, p, z, y, w, t, z, r, q, d, l, t, s, c, m, 。, z, g, d, c, x, y, g, p, a, l, s, c, l, ,, z, h, a, z, x, s, z, d, t, d, m, s, 。, z, s, x, d, g, y, j, y, t, x, k, l, z, d, r, z, h, d, k, z, 。, n, f, y, d, s, c, d, c, x, y, s, r, z, j, c, d, n, ,, d, r, k, w, q, d, ,, t, m, w, w, b, j, l, b, ,, y, l, j, z, r, t, x, d, r, l, b, c, q, d, d, y, f, 。, t, m, x, x, ,, y, z, z, f, s, ,, n, g, m, p, s, k, z, x, z, s, b, s, g, q, x, y, d, w, l, e, d, l, d, d, b, f, y, s, …, x, l, d, f, q, z, n, q, d, s, h, y, s, c, y, y, s, l, j, s, l, z, c, d, d, m, ,, b, g, l, r, j, y, d, s, ,, d, l, x, l, z, y, d, ,, h, d, d, x, d, y, s, l, ,, d, s, c, x, y, k, b, d, w, d, b, c, d, s, r, c, d, w, z, 。, , j, z, 2, 4, x, s, z, q, ,, z, x, d, x, q, c, P, M, c, c, l, ,, w, l, d, d, z, f, z, r, d, k, z, ,, m, n, m, k, j, 、, x, m, 、, d, s, 、, z, g, ,, s, j, l, h, d, d, d, h, l, z, n, d, d, f, s, s, k, 。, m, n, z, d, ,, x, q, d, b, x, q, z, y, d, d, d, l, t, ,, m, n, m, y, y, z, k, d, s, d, d, d, m, j, x, j, z, d, j, g, ,, r, h, y, g, x, q, d, k, n, z, 2, 4, x, s, z, h, s, q, y, b, d, h, l, ,, b, c, y, w, b, z, d, l, j, c, y, 。] [zheng4, pin3, xing2, huo4, !] [zheng4, pin3, hang2, huo4, !] [ma3, wan2, dai4, ma3, ,, ta1, qi3, shen1, guan1, shang4, dian4, nao3, ,, yong4, gun3, tang4, de5, kai1, shui3, wei2, zi4, ji3, pao4, zhi4, yi1, wan3, teng2, zhe5, re4, qi4, de5, lao3, tan2, suan1, cai4, mian4, 。, zhong1, guo2, de5, cheng2, xu4, yuan2, geng4, pian1, ai4, la1, shang4, chuang1, lian2, ,, zai4, hei1, an4, zhong1, xiang3, shou4, zhei4, du2, te4, de, mei3, shi2, 。, zhei4, shi4, xian4, dai4, gong1, ye4, ji3, yi1, tian1, xin1, ku3, lao2, zuo4, de5, ren2, zui4, hao3, de5, kui4, zeng4, 。, nan2, fang1, yi1, dai4, sheng1, chang2, de5, cheng2, xu4, yuan2, sui1, ran2, zai4, jing1, cheng2, duo1, nian2, ,, dan4, reng2, kou3, wei4, qing1, dan4, ,, ta1, men2, wang3, wang3, bu4, jia1, liao4, bao1, ,, you2, lian3, jia2, zi4, ran2, tang3, xia4, de, re4, lei4, bu3, chong1, qia4, dang1, de5, yan2, fen1, 。, ta1, men2, xiang1, xin4, ,, yong4, zhei4, zhong3, fang1, shi4, ,, neng2, gou4, mo3, ping2, si1, kao3, zhe5, xian4, zai4, shi4, bu4, shi4, guo4, qu4, xiang3, yao4, de5, wei4, lai2, er2, dai4, lai2, de5, da4, bu4, fen1, you1, shang1, …, xiao3, li3, de5, fu4, qin1, zai4, nian2, qing1, de5, shi2, hou4, ye3, shi4, cong2, ye2, ye2, shou3, li3, jie1, shou1, le5, zu3, chuan2, de5, dai4, ma3, ,, bu4, guo4, ling4, ren2, jing1, ya4, de, shi4, ,, dao4, le, xiao3, li3, zhei4, yi1, dai4, ,, hen3, duo1, dong1, xi1, dou1, yi2, shi1, le5, ,, dan4, shi4, cheng2, xu4, yuan2, ku3, bi1, de5, wei4, dao4, bao3, cun2, de, shi4, ru2, ci3, de5, wan2, zheng3, 。, , jiu4, zai4, 2, 4, xiao3, shi2, zhi1, qian2, ,, zui4, xin1, de5, xu1, qiu2, cong2, P, M, chu3, chuan2, lai2, ,, wei2, le, de2, dao4, zhei4, fen4, zi4, ran2, de5, kui4, zeng4, ,, ma3, nong2, men5, kai1, ji1, 、, xie3, ma3, 、, diao4, shi4, 、, zhong4, gou4, ,, si4, ji4, lun2, hui2, de5, deng3, dai4, huan4, lai2, zhei4, nan2, de2, de5, feng1, shou1, shi2, ke4, 。, ma3, nong2, zhi1, dao4, ,, xu1, qiu2, de, bao3, xian1, qi1, zhi1, you3, duan3, duan3, de5, liang3, tian1, ,, ma3, nong2, men5, yao4, yi3, zui4, kuai4, de5, su4, du4, dui4, dai4, ma3, jin4, xing2, jing1, zhi4, de5, jia1, gong1, ,, ren4, he2, yi1, ge4, xu1, qiu2, dou1, ke3, neng2, zai4, 2, 4, xiao3, shi2, zhi1, hou4, shi1, qu4, yuan2, ben3, de5, huo2, li4, ,, bian4, cheng2, yi1, wen2, bu4, zhi2, de5, la1, ji1, chuang4, yi4, 。] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 sec Running org.nlpcn.commons.lang.standardization.SentencesUtilTest 中国 123.1 你好。 123 hello word . hello word Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.017 sec Running org.nlpcn.commons.lang.tire.splitWord.SmartGetWordTest android 3 java 3 中国人 3 0 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Running org.nlpcn.commons.lang.util.StringUtilTest true hello ansj 'ansj','2134','123','123','123' Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Running org.nlpcn.commons.lang.util.WordAlertTest az az az az 09· Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088 sec
Results :
Tests in error: test(org.nlpcn.commons.lang.dat.DATMakerTest) loadTest(org.nlpcn.commons.lang.dat.DATMakerTest): 生成模型的路径 (No such file or directory) loadTextTest(org.nlpcn.commons.lang.dat.DATTest) loadTest(org.nlpcn.commons.lang.dat.DATTest): /home/ansj/公共的 /pinyin.obj (No such file or directory) makerTest(org.nlpcn.commons.lang.dat.DATTest)
Tests run: 17, Failures: 0, Errors: 5, Skipped: 0
[INFO]
[INFO] BUILD FAILURE
[INFO]
[INFO] Total time: 2.831 s [INFO] Finished at: 2014-07-14T18:04:35+08:00 [INFO] Final Memory: 7M/184M
[INFO]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project nlp-lang: There are test failures. [ERROR] [ERROR] Please refer to /Users/william/Documents/AtWork/github/nlp-lang/target/surefire-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
— Reply to this email directly or view it on GitHub https://github.com/NLPchina/nlp-lang/issues/1.
@ansjsun 又有出现FAILED: mvn test
src/test/java/org/nlpcn/commons/lang/dat/DATTest.java:13: dat.saveText("/home/ansj/公共的/pinyin.dat");
src/test/java/org/nlpcn/commons/lang/dat/DATTest.java:29: DoubleArrayTire load = DoubleArrayTire.loadText("/home/ansj/公共的/pinyin.dat");
请将文件地址及文件指向该项目下的相对目录, :+1:
额..这个比较麻烦额.因为有些测试数据比较大部好放到代码中.建议用maven 编译的时候skiptest
当然从这里移除我也会考虑的..谢谢你的意见
On Aug 12, 2014, at 4:18 PM, larryhu notifications@github.com wrote:
@ansjsun 又有出现FAILED: mvn test
src/test/java/org/nlpcn/commons/lang/dat/DATTest.java:13: dat.saveText("/home/ansj/公共的/pinyin.dat"); src/test/java/org/nlpcn/commons/lang/dat/DATTest.java:29: DoubleArrayTire load = DoubleArrayTire.loadText("/home/ansj/公共的/pinyin.dat"); 请将文件地址及文件指向该项目下的相对目录,
— Reply to this email directly or view it on GitHub.
@ansjsun 感谢您这么快的回复, 并且深深地感谢您提供了这么优质的开源项目
如果测试数据比较大, 可以在构建环境的时候让用户去下载或者跳过, 最好是提供一些shell或者bat下载脚本, 这样有需要的就会自动去下载了.
另外对于这个测试代码, 可以先检测文件是否存在, 如果存在就继续走测试, 如果不存在就输出warning提示用户需执行下载脚本下载该测试文件, 我觉得这样会比较好.
望采纳 如果作者比较忙且愿意这样更改, 我愿意贡献一份自己的力量, 将修改好的代码push上来, 您再合并即可. :-)
tag: 需您提供下载地址
你好..测试文件暂时能帮我做个容错么就是判断下文件是否存在.如果不存在就不做这个测试..但是输出warning ..就是你说的那个方案....等我再回头想想办法....怎么处理这个...谢谢你的意见
$ java -version java version "1.8.0_05" Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
$ mvn compile OK.
$ mvn test: FAILED; see below.
INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.nlpcn:nlp-lang:jar:0.2 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 78, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building nlp-lang 0.2 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ nlp-lang --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ nlp-lang --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ nlp-lang --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/william/Documents/AtWork/github/nlp-lang/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ nlp-lang --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ nlp-lang --- [INFO] Surefire report directory: /Users/william/Documents/AtWork/github/nlp-lang/target/surefire-reports
T E S T S
Running org.nlpcn.commons.lang.dat.DATMakerTest Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.106 sec <<< FAILURE! test(org.nlpcn.commons.lang.dat.DATMakerTest) Time elapsed: 0.043 sec <<< ERROR! java.lang.NullPointerException at org.nlpcn.commons.lang.dat.DATMaker.maker(DATMaker.java:76) at org.nlpcn.commons.lang.dat.DATMakerTest.test(DATMakerTest.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
loadTest(org.nlpcn.commons.lang.dat.DATMakerTest) Time elapsed: 0.007 sec <<< ERROR! java.io.FileNotFoundException: 生成模型的路径 (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:131)
at java.io.FileInputStream.(FileInputStream.java:87)
at org.nlpcn.commons.lang.dat.DoubleArrayTire.load(DoubleArrayTire.java:31)
at org.nlpcn.commons.lang.dat.DATMakerTest.loadTest(DATMakerTest.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Running org.nlpcn.commons.lang.dat.DATTest Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.051 sec <<< FAILURE! loadTextTest(org.nlpcn.commons.lang.dat.DATTest) Time elapsed: 0.012 sec <<< ERROR! java.lang.NullPointerException at java.io.Reader.(Reader.java:78)
at java.io.InputStreamReader.(InputStreamReader.java:97)
at org.nlpcn.commons.lang.util.IOUtil.getReader(IOUtil.java:63)
at org.nlpcn.commons.lang.util.FileIterator.(FileIterator.java:24)
at org.nlpcn.commons.lang.util.IOUtil.instanceFileIterator(IOUtil.java:200)
at org.nlpcn.commons.lang.dat.DoubleArrayTire.loadText(DoubleArrayTire.java:70)
at org.nlpcn.commons.lang.dat.DoubleArrayTire.loadText(DoubleArrayTire.java:57)
at org.nlpcn.commons.lang.dat.DoubleArrayTire.loadText(DoubleArrayTire.java:93)
at org.nlpcn.commons.lang.dat.DATTest.loadTextTest(DATTest.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
loadTest(org.nlpcn.commons.lang.dat.DATTest) Time elapsed: 0.016 sec <<< ERROR! java.io.FileNotFoundException: /home/ansj/公共的/pinyin.obj (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:131)
at java.io.FileInputStream.(FileInputStream.java:87)
at org.nlpcn.commons.lang.dat.DoubleArrayTire.load(DoubleArrayTire.java:31)
at org.nlpcn.commons.lang.dat.DATTest.loadTest(DATTest.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
makerTest(org.nlpcn.commons.lang.dat.DATTest) Time elapsed: 0.02 sec <<< ERROR! java.lang.NullPointerException at org.nlpcn.commons.lang.dat.DATMaker.maker(DATMaker.java:76) at org.nlpcn.commons.lang.dat.DATMaker.maker(DATMaker.java:48) at org.nlpcn.commons.lang.dat.DATTest.makerTest(DATTest.java:11) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Running org.nlpcn.commons.lang.finger.FingerprintServiceTest 76cebd01faa63f38b45ea9756d26872c 76cebd01faa63f38b45ea9756d26872c Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec Running org.nlpcn.commons.lang.index.MemoryIndexTest [中国] [中国] [中国] [中国] init ok use time 547 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.538 sec Running org.nlpcn.commons.lang.jianfan.JianFanTest 草莓是红色的 士多啤棃是紅色的 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec Running org.nlpcn.commons.lang.pinyin.PinyinTest [ma3, wan2, dai4, ma3, ,, ta1, qi3, shen1, guan1, shang4, dian4, nao3, ,, yong4, gun3, tang4, de5, kai1, shui3, wei2, zi4, ji3, pao4, zhi4, yi1, wan3, teng2, zhe5, re4, qi4, de5, lao3, tan2, suan1, cai4, mian4, 。, zhong1, guo2, de5, cheng2, xu4, yuan2, geng4, pian1, ai4, la1, shang4, chuang1, lian2, ,, zai4, hei1, an4, zhong1, xiang3, shou4, zhei4, du2, te4, de, mei3, shi2, 。, zhei4, shi4, xian4, dai4, gong1, ye4, ji3, yi1, tian1, xin1, ku3, lao2, zuo4, de5, ren2, zui4, hao3, de5, kui4, zeng4, 。, nan2, fang1, yi1, dai4, sheng1, chang2, de5, cheng2, xu4, yuan2, sui1, ran2, zai4, jing1, cheng2, duo1, nian2, ,, dan4, reng2, kou3, wei4, qing1, dan4, ,, ta1, men2, wang3, wang3, bu4, jia1, liao4, bao1, ,, you2, lian3, jia2, zi4, ran2, tang3, xia4, de, re4, lei4, bu3, chong1, qia4, dang1, de5, yan2, fen1, 。, ta1, men2, xiang1, xin4, ,, yong4, zhei4, zhong3, fang1, shi4, ,, neng2, gou4, mo3, ping2, si1, kao3, zhe5, xian4, zai4, shi4, bu4, shi4, guo4, qu4, xiang3, yao4, de5, wei4, lai2, er2, dai4, lai2, de5, da4, bu4, fen1, you1, shang1, …, xiao3, li3, de5, fu4, qin1, zai4, nian2, qing1, de5, shi2, hou4, ye3, shi4, cong2, ye2, ye2, shou3, li3, jie1, shou1, le5, zu3, chuan2, de5, dai4, ma3, ,, bu4, guo4, ling4, ren2, jing1, ya4, de, shi4, ,, dao4, le, xiao3, li3, zhei4, yi1, dai4, ,, hen3, duo1, dong1, xi1, dou1, yi2, shi1, le5, ,, dan4, shi4, cheng2, xu4, yuan2, ku3, bi1, de5, wei4, dao4, bao3, cun2, de, shi4, ru2, ci3, de5, wan2, zheng3, 。, , jiu4, zai4, 2, 4, xiao3, shi2, zhi1, qian2, ,, zui4, xin1, de5, xu1, qiu2, cong2, P, M, chu3, chuan2, lai2, ,, wei2, le, de2, dao4, zhei4, fen4, zi4, ran2, de5, kui4, zeng4, ,, ma3, nong2, men5, kai1, ji1, 、, xie3, ma3, 、, diao4, shi4, 、, zhong4, gou4, ,, si4, ji4, lun2, hui2, de5, deng3, dai4, huan4, lai2, zhei4, nan2, de2, de5, feng1, shou1, shi2, ke4, 。, ma3, nong2, zhi1, dao4, ,, xu1, qiu2, de, bao3, xian1, qi1, zhi1, you3, duan3, duan3, de5, liang3, tian1, ,, ma3, nong2, men5, yao4, yi3, zui4, kuai4, de5, su4, du4, dui4, dai4, ma3, jin4, xing2, jing1, zhi4, de5, jia1, gong1, ,, ren4, he2, yi1, ge4, xu1, qiu2, dou1, ke3, neng2, zai4, 2, 4, xiao3, shi2, zhi1, hou4, shi1, qu4, yuan2, ben3, de5, huo2, li4, ,, bian4, cheng2, yi1, wen2, bu4, zhi2, de5, la1, ji1, chuang4, yi4, 。] [ma, wan, dai, ma, ,, ta, qi, shen, guan, shang, dian, nao, ,, yong, gun, tang, de, kai, shui, wei, zi, ji, pao, zhi, yi, wan, teng, zhe, re, qi, de, lao, tan, suan, cai, mian, 。, zhong, guo, de, cheng, xu, yuan, geng, pian, ai, la, shang, chuang, lian, ,, zai, hei, an, zhong, xiang, shou, zhei, du, te, de, mei, shi, 。, zhei, shi, xian, dai, gong, ye, ji, yi, tian, xin, ku, lao, zuo, de, ren, zui, hao, de, kui, zeng, 。, nan, fang, yi, dai, sheng, chang, de, cheng, xu, yuan, sui, ran, zai, jing, cheng, duo, nian, ,, dan, reng, kou, wei, qing, dan, ,, ta, men, wang, wang, bu, jia, liao, bao, ,, you, lian, jia, zi, ran, tang, xia, de, re, lei, bu, chong, qia, dang, de, yan, fen, 。, ta, men, xiang, xin, ,, yong, zhei, zhong, fang, shi, ,, neng, gou, mo, ping, si, kao, zhe, xian, zai, shi, bu, shi, guo, qu, xiang, yao, de, wei, lai, er, dai, lai, de, da, bu, fen, you, shang, …, xiao, li, de, fu, qin, zai, nian, qing, de, shi, hou, ye, shi, cong, ye, ye, shou, li, jie, shou, le, zu, chuan, de, dai, ma, ,, bu, guo, ling, ren, jing, ya, de, shi, ,, dao, le, xiao, li, zhei, yi, dai, ,, hen, duo, dong, xi, dou, yi, shi, le, ,, dan, shi, cheng, xu, yuan, ku, bi, de, wei, dao, bao, cun, de, shi, ru, ci, de, wan, zheng, 。, , jiu, zai, 2, 4, xiao, shi, zhi, qian, ,, zui, xin, de, xu, qiu, cong, P, M, chu, chuan, lai, ,, wei, le, de, dao, zhei, fen, zi, ran, de, kui, zeng, ,, ma, nong, men, kai, ji, 、, xie, ma, 、, diao, shi, 、, zhong, gou, ,, si, ji, lun, hui, de, deng, dai, huan, lai, zhei, nan, de, de, feng, shou, shi, ke, 。, ma, nong, zhi, dao, ,, xu, qiu, de, bao, xian, qi, zhi, you, duan, duan, de, liang, tian, ,, ma, nong, men, yao, yi, zui, kuai, de, su, du, dui, dai, ma, jin, xing, jing, zhi, de, jia, gong, ,, ren, he, yi, ge, xu, qiu, dou, ke, neng, zai, 2, 4, xiao, shi, zhi, hou, shi, qu, yuan, ben, de, huo, li, ,, bian, cheng, yi, wen, bu, zhi, de, la, ji, chuang, yi, 。] [m, w, d, m, ,, t, q, s, g, s, d, n, ,, y, g, t, d, k, s, w, z, j, p, z, y, w, t, z, r, q, d, l, t, s, c, m, 。, z, g, d, c, x, y, g, p, a, l, s, c, l, ,, z, h, a, z, x, s, z, d, t, d, m, s, 。, z, s, x, d, g, y, j, y, t, x, k, l, z, d, r, z, h, d, k, z, 。, n, f, y, d, s, c, d, c, x, y, s, r, z, j, c, d, n, ,, d, r, k, w, q, d, ,, t, m, w, w, b, j, l, b, ,, y, l, j, z, r, t, x, d, r, l, b, c, q, d, d, y, f, 。, t, m, x, x, ,, y, z, z, f, s, ,, n, g, m, p, s, k, z, x, z, s, b, s, g, q, x, y, d, w, l, e, d, l, d, d, b, f, y, s, …, x, l, d, f, q, z, n, q, d, s, h, y, s, c, y, y, s, l, j, s, l, z, c, d, d, m, ,, b, g, l, r, j, y, d, s, ,, d, l, x, l, z, y, d, ,, h, d, d, x, d, y, s, l, ,, d, s, c, x, y, k, b, d, w, d, b, c, d, s, r, c, d, w, z, 。, , j, z, 2, 4, x, s, z, q, ,, z, x, d, x, q, c, P, M, c, c, l, ,, w, l, d, d, z, f, z, r, d, k, z, ,, m, n, m, k, j, 、, x, m, 、, d, s, 、, z, g, ,, s, j, l, h, d, d, d, h, l, z, n, d, d, f, s, s, k, 。, m, n, z, d, ,, x, q, d, b, x, q, z, y, d, d, d, l, t, ,, m, n, m, y, y, z, k, d, s, d, d, d, m, j, x, j, z, d, j, g, ,, r, h, y, g, x, q, d, k, n, z, 2, 4, x, s, z, h, s, q, y, b, d, h, l, ,, b, c, y, w, b, z, d, l, j, c, y, 。] [zheng4, pin3, xing2, huo4, !] [zheng4, pin3, hang2, huo4, !] [ma3, wan2, dai4, ma3, ,, ta1, qi3, shen1, guan1, shang4, dian4, nao3, ,, yong4, gun3, tang4, de5, kai1, shui3, wei2, zi4, ji3, pao4, zhi4, yi1, wan3, teng2, zhe5, re4, qi4, de5, lao3, tan2, suan1, cai4, mian4, 。, zhong1, guo2, de5, cheng2, xu4, yuan2, geng4, pian1, ai4, la1, shang4, chuang1, lian2, ,, zai4, hei1, an4, zhong1, xiang3, shou4, zhei4, du2, te4, de, mei3, shi2, 。, zhei4, shi4, xian4, dai4, gong1, ye4, ji3, yi1, tian1, xin1, ku3, lao2, zuo4, de5, ren2, zui4, hao3, de5, kui4, zeng4, 。, nan2, fang1, yi1, dai4, sheng1, chang2, de5, cheng2, xu4, yuan2, sui1, ran2, zai4, jing1, cheng2, duo1, nian2, ,, dan4, reng2, kou3, wei4, qing1, dan4, ,, ta1, men2, wang3, wang3, bu4, jia1, liao4, bao1, ,, you2, lian3, jia2, zi4, ran2, tang3, xia4, de, re4, lei4, bu3, chong1, qia4, dang1, de5, yan2, fen1, 。, ta1, men2, xiang1, xin4, ,, yong4, zhei4, zhong3, fang1, shi4, ,, neng2, gou4, mo3, ping2, si1, kao3, zhe5, xian4, zai4, shi4, bu4, shi4, guo4, qu4, xiang3, yao4, de5, wei4, lai2, er2, dai4, lai2, de5, da4, bu4, fen1, you1, shang1, …, xiao3, li3, de5, fu4, qin1, zai4, nian2, qing1, de5, shi2, hou4, ye3, shi4, cong2, ye2, ye2, shou3, li3, jie1, shou1, le5, zu3, chuan2, de5, dai4, ma3, ,, bu4, guo4, ling4, ren2, jing1, ya4, de, shi4, ,, dao4, le, xiao3, li3, zhei4, yi1, dai4, ,, hen3, duo1, dong1, xi1, dou1, yi2, shi1, le5, ,, dan4, shi4, cheng2, xu4, yuan2, ku3, bi1, de5, wei4, dao4, bao3, cun2, de, shi4, ru2, ci3, de5, wan2, zheng3, 。, , jiu4, zai4, 2, 4, xiao3, shi2, zhi1, qian2, ,, zui4, xin1, de5, xu1, qiu2, cong2, P, M, chu3, chuan2, lai2, ,, wei2, le, de2, dao4, zhei4, fen4, zi4, ran2, de5, kui4, zeng4, ,, ma3, nong2, men5, kai1, ji1, 、, xie3, ma3, 、, diao4, shi4, 、, zhong4, gou4, ,, si4, ji4, lun2, hui2, de5, deng3, dai4, huan4, lai2, zhei4, nan2, de2, de5, feng1, shou1, shi2, ke4, 。, ma3, nong2, zhi1, dao4, ,, xu1, qiu2, de, bao3, xian1, qi1, zhi1, you3, duan3, duan3, de5, liang3, tian1, ,, ma3, nong2, men5, yao4, yi3, zui4, kuai4, de5, su4, du4, dui4, dai4, ma3, jin4, xing2, jing1, zhi4, de5, jia1, gong1, ,, ren4, he2, yi1, ge4, xu1, qiu2, dou1, ke3, neng2, zai4, 2, 4, xiao3, shi2, zhi1, hou4, shi1, qu4, yuan2, ben3, de5, huo2, li4, ,, bian4, cheng2, yi1, wen2, bu4, zhi2, de5, la1, ji1, chuang4, yi4, 。] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 sec Running org.nlpcn.commons.lang.standardization.SentencesUtilTest 中国 123.1 你好。 123 hello word . hello word Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.017 sec Running org.nlpcn.commons.lang.tire.splitWord.SmartGetWordTest android 3 java 3 中国人 3 0 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Running org.nlpcn.commons.lang.util.StringUtilTest true hello ansj 'ansj','2134','123','123','123' Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Running org.nlpcn.commons.lang.util.WordAlertTest az az az az 09· Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088 sec
Results :
Tests in error: test(org.nlpcn.commons.lang.dat.DATMakerTest) loadTest(org.nlpcn.commons.lang.dat.DATMakerTest): 生成模型的路径 (No such file or directory) loadTextTest(org.nlpcn.commons.lang.dat.DATTest) loadTest(org.nlpcn.commons.lang.dat.DATTest): /home/ansj/公共的/pinyin.obj (No such file or directory) makerTest(org.nlpcn.commons.lang.dat.DATTest)
Tests run: 17, Failures: 0, Errors: 5, Skipped: 0
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.831 s [INFO] Finished at: 2014-07-14T18:04:35+08:00 [INFO] Final Memory: 7M/184M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project nlp-lang: There are test failures. [ERROR] [ERROR] Please refer to /Users/william/Documents/AtWork/github/nlp-lang/target/surefire-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException