From e559383b9127afcef0a3d201e10eeb7420fbebc2 Mon Sep 17 00:00:00 2001 From: wjz Date: Thu, 10 Dec 2015 08:22:03 +0800 Subject: [PATCH 1/8] adapt the fnlp-core for git maven release package --- fnlp-core/pom.xml | 48 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/fnlp-core/pom.xml b/fnlp-core/pom.xml index 4de6498..636c242 100644 --- a/fnlp-core/pom.xml +++ b/fnlp-core/pom.xml @@ -9,7 +9,7 @@ org.fnlp fnlp-core - 2.1-SNAPSHOT + 2.1-SNAPSHOT-gubnoi-v1 fnlp-core https://github.com/xpqiu/fnlp/ FNLP is developed for Chinese natural language processing (NLP), which also includes some machine learning algorithms and data sets to achieve the NLP tasks. FNLP is distributed under LGPL3.0. @@ -18,6 +18,13 @@ http://www.fnlp.org + + + synergian-repo + https://raw.github.com/synergian/wagon-git/releases + + + scm:git:git@github.com:xpqiu/fnlp.git scm:git:git@github.com:xpqiu/fnlp.git @@ -28,6 +35,17 @@ UTF-8 + + + net.sf.trove4j + trove4j + 3.0.3 + + + commons-cli + commons-cli + 1.2 + junit junit @@ -40,14 +58,18 @@ release - - sonatype-nexus-snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - - sonatype-nexus-staging - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - + + + com.gubnoi.fnlp + Gubnoi NLP + git:releases://git@github.com:jing-zhou/fnlp.git + + + + com.gubnoi.fnlp + Gubnoi NLP + git:snapshots://git@github.com:jing-zhou/fnlp.git + @@ -99,6 +121,14 @@ + + + ar.com.synergian + wagon-git + 0.2.5 + + + org.apache.maven.plugins From a7fd16c9c52e9c52c697a46554bba75f8cc1bfc0 Mon Sep 17 00:00:00 2001 From: wjz Date: Thu, 10 Dec 2015 08:39:39 +0800 Subject: [PATCH 2/8] change the error in pom regarding the git maven release --- fnlp-core/pom.xml | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/fnlp-core/pom.xml b/fnlp-core/pom.xml index 636c242..ec0a718 100644 --- a/fnlp-core/pom.xml +++ b/fnlp-core/pom.xml @@ -58,18 +58,14 @@ release - - - com.gubnoi.fnlp - Gubnoi NLP - git:releases://git@github.com:jing-zhou/fnlp.git - - - - com.gubnoi.fnlp - Gubnoi NLP - git:snapshots://git@github.com:jing-zhou/fnlp.git - + + sonatype-nexus-snapshots + https://oss.sonatype.org/content/repositories/snapshots/ + + + sonatype-nexus-staging + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + @@ -119,7 +115,21 @@ - + + + + + com.gubnoi.fnlp + Gubnoi NLP + git:releases://git@github.com:jing-zhou/fnlp.git + + + + com.gubnoi.fnlp + Gubnoi NLP + git:snapshots://git@github.com:jing-zhou/fnlp.git + + From d25f2ef3fc67c9360f11e3d0b489edff4d7b9844 Mon Sep 17 00:00:00 2001 From: wjz Date: Mon, 14 Dec 2015 16:46:12 +0800 Subject: [PATCH 3/8] incorporate the models resources into the fnlp-core jar; correct the defects of models loading error --- fnlp-core/.classpath | 50 +++++++++---------- .../.settings/org.eclipse.jdt.core.prefs | 25 +++++----- fnlp-core/pom.xml | 13 ++++- .../org/fnlp/ml/classifier/linear/Linear.java | 8 +-- .../org/fnlp/nlp/cn/tag/AbstractTagger.java | 12 ++--- 5 files changed, 57 insertions(+), 51 deletions(-) diff --git a/fnlp-core/.classpath b/fnlp-core/.classpath index b46ac09..a4ad718 100644 --- a/fnlp-core/.classpath +++ b/fnlp-core/.classpath @@ -1,27 +1,23 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fnlp-core/.settings/org.eclipse.jdt.core.prefs b/fnlp-core/.settings/org.eclipse.jdt.core.prefs index 1845056..5ac0174 100644 --- a/fnlp-core/.settings/org.eclipse.jdt.core.prefs +++ b/fnlp-core/.settings/org.eclipse.jdt.core.prefs @@ -1,17 +1,16 @@ -#Tue Mar 11 13:39:47 CST 2014 -encoding/src/test/java=UTF-8 -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -encoding/src/main/resources=UTF-8 -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -encoding/src/main/java=UTF-8 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.debug.lineNumber=generate eclipse.preferences.version=1 +encoding/src/main/java=UTF-8 +encoding/src/main/resources=UTF-8 +encoding/src/test/java=UTF-8 encoding/src/test/resources=UTF-8 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/fnlp-core/pom.xml b/fnlp-core/pom.xml index ec0a718..7720870 100644 --- a/fnlp-core/pom.xml +++ b/fnlp-core/pom.xml @@ -9,7 +9,7 @@ org.fnlp fnlp-core - 2.1-SNAPSHOT-gubnoi-v1 + 2.1-SNAPSHOT-gubnoi-v4 fnlp-core https://github.com/xpqiu/fnlp/ FNLP is developed for Chinese natural language processing (NLP), which also includes some machine learning algorithms and data sets to achieve the NLP tasks. FNLP is distributed under LGPL3.0. @@ -151,5 +151,16 @@ + + + models + /home/wjz/wso2/fnlp/models + + **/*.* + + + + + diff --git a/fnlp-core/src/main/java/org/fnlp/ml/classifier/linear/Linear.java b/fnlp-core/src/main/java/org/fnlp/ml/classifier/linear/Linear.java index cf68e73..39b6724 100644 --- a/fnlp-core/src/main/java/org/fnlp/ml/classifier/linear/Linear.java +++ b/fnlp-core/src/main/java/org/fnlp/ml/classifier/linear/Linear.java @@ -108,10 +108,10 @@ public void saveTo(String file) throws IOException { public static Linear loadFrom(String file) throws LoadModelException{ Linear cl = null; try { - ObjectInputStream in = new ObjectInputStream(new GZIPInputStream( - new BufferedInputStream(new FileInputStream(file)))); - cl = (Linear) in.readObject(); - in.close(); + ObjectInputStream in = new ObjectInputStream(new GZIPInputStream( + new BufferedInputStream(Linear.class.getClassLoader().getResourceAsStream(file)))); + cl = (Linear) in.readObject(); + in.close(); } catch (Exception e) { throw new LoadModelException(e,file); } diff --git a/fnlp-core/src/main/java/org/fnlp/nlp/cn/tag/AbstractTagger.java b/fnlp-core/src/main/java/org/fnlp/nlp/cn/tag/AbstractTagger.java index 4701604..f9029d3 100644 --- a/fnlp-core/src/main/java/org/fnlp/nlp/cn/tag/AbstractTagger.java +++ b/fnlp-core/src/main/java/org/fnlp/nlp/cn/tag/AbstractTagger.java @@ -198,12 +198,12 @@ public void saveTo(String modelfile) throws IOException { } public void loadFrom(String modelfile) throws LoadModelException{ - try { - ObjectInputStream in = new ObjectInputStream(new BufferedInputStream( - new GZIPInputStream(new FileInputStream(modelfile)))); - templets = (TempletGroup) in.readObject(); - setClassifier((Linear) in.readObject()); - in.close(); + try { + ObjectInputStream in = new ObjectInputStream(new BufferedInputStream( + new GZIPInputStream(this.getClass().getClassLoader().getResourceAsStream(modelfile)))); + templets = (TempletGroup) in.readObject(); + setClassifier((Linear) in.readObject()); + in.close(); } catch (Exception e) { throw new LoadModelException(e,modelfile); } From 128184c6ba444fdda86c1eb798643a08ca21167b Mon Sep 17 00:00:00 2001 From: wjz Date: Tue, 15 Dec 2015 08:46:51 +0800 Subject: [PATCH 4/8] update to Java 8 --- fnlp-dev/.classpath | 48 +++++++++---------- fnlp-dev/.settings/org.eclipse.jdt.core.prefs | 18 +++---- fnlp-train/.classpath | 48 +++++++++---------- .../.settings/org.eclipse.jdt.core.prefs | 6 +-- 4 files changed, 57 insertions(+), 63 deletions(-) diff --git a/fnlp-dev/.classpath b/fnlp-dev/.classpath index c9464c0..a67b19b 100644 --- a/fnlp-dev/.classpath +++ b/fnlp-dev/.classpath @@ -1,26 +1,22 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/fnlp-dev/.settings/org.eclipse.jdt.core.prefs b/fnlp-dev/.settings/org.eclipse.jdt.core.prefs index 7d4cc82..7bd84e7 100644 --- a/fnlp-dev/.settings/org.eclipse.jdt.core.prefs +++ b/fnlp-dev/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,12 @@ -#Tue Mar 11 13:39:47 CST 2014 -encoding/src/test/java=UTF-8 -org.eclipse.jdt.core.compiler.compliance=1.6 -encoding/src/main/resources=UTF-8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -encoding/src/main/java=UTF-8 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 eclipse.preferences.version=1 +encoding/src/main/java=UTF-8 +encoding/src/main/resources=UTF-8 +encoding/src/test/java=UTF-8 encoding/src/test/resources=UTF-8 -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/fnlp-train/.classpath b/fnlp-train/.classpath index f94f9d9..6e58653 100644 --- a/fnlp-train/.classpath +++ b/fnlp-train/.classpath @@ -1,26 +1,22 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/fnlp-train/.settings/org.eclipse.jdt.core.prefs b/fnlp-train/.settings/org.eclipse.jdt.core.prefs index 107056a..672496e 100644 --- a/fnlp-train/.settings/org.eclipse.jdt.core.prefs +++ b/fnlp-train/.settings/org.eclipse.jdt.core.prefs @@ -1,12 +1,12 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.8 From bfdafa7ea23383f36efa207df8b63d9ad08593a8 Mon Sep 17 00:00:00 2001 From: wjz Date: Tue, 15 Dec 2015 08:51:53 +0800 Subject: [PATCH 5/8] update fnlp-core dependency to fnlp-core-2.1-SNAPSHOT-gubnoi-v4 --- fnlp-dev/pom.xml | 2 +- fnlp-train/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fnlp-dev/pom.xml b/fnlp-dev/pom.xml index 906f3b9..ac5379c 100644 --- a/fnlp-dev/pom.xml +++ b/fnlp-dev/pom.xml @@ -24,7 +24,7 @@ org.fnlp fnlp-core - 2.1-SNAPSHOT + 2.1-SNAPSHOT-gubnoi-v4 diff --git a/fnlp-train/pom.xml b/fnlp-train/pom.xml index 566eb05..08e22bf 100644 --- a/fnlp-train/pom.xml +++ b/fnlp-train/pom.xml @@ -24,7 +24,7 @@ org.fnlp fnlp-core - 2.1-SNAPSHOT + 2.1-SNAPSHOT-gubnoi-v4 From 8b37489d2e497503d249c312dbca3e60bb239db7 Mon Sep 17 00:00:00 2001 From: wjz Date: Wed, 30 Dec 2015 08:57:23 +0800 Subject: [PATCH 6/8] separate the fnlp-core to a standalone repository in bit bucket for release purpose update the dependencies --- fnlp-core/pom.xml | 6 +++--- fnlp-dev/pom.xml | 2 +- fnlp-train/pom.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fnlp-core/pom.xml b/fnlp-core/pom.xml index 7720870..7c3f2fd 100644 --- a/fnlp-core/pom.xml +++ b/fnlp-core/pom.xml @@ -9,7 +9,7 @@ org.fnlp fnlp-core - 2.1-SNAPSHOT-gubnoi-v4 + 2.1-SNAPSHOT-gubnoi-v5 fnlp-core https://github.com/xpqiu/fnlp/ FNLP is developed for Chinese natural language processing (NLP), which also includes some machine learning algorithms and data sets to achieve the NLP tasks. FNLP is distributed under LGPL3.0. @@ -121,13 +121,13 @@ com.gubnoi.fnlp Gubnoi NLP - git:releases://git@github.com:jing-zhou/fnlp.git + git:releases://git@bitbucket.org:teamgubnoi/fnlp-core.git com.gubnoi.fnlp Gubnoi NLP - git:snapshots://git@github.com:jing-zhou/fnlp.git + git:snapshots://git@bitbucket.org:teamgubnoi/fnlp-core.git diff --git a/fnlp-dev/pom.xml b/fnlp-dev/pom.xml index ac5379c..da4eec4 100644 --- a/fnlp-dev/pom.xml +++ b/fnlp-dev/pom.xml @@ -24,7 +24,7 @@ org.fnlp fnlp-core - 2.1-SNAPSHOT-gubnoi-v4 + 2.1-SNAPSHOT-gubnoi-v5 diff --git a/fnlp-train/pom.xml b/fnlp-train/pom.xml index 08e22bf..c71c1fb 100644 --- a/fnlp-train/pom.xml +++ b/fnlp-train/pom.xml @@ -24,7 +24,7 @@ org.fnlp fnlp-core - 2.1-SNAPSHOT-gubnoi-v4 + 2.1-SNAPSHOT-gubnoi-v5 From 76cebd97a2f452b3ca98b59cd51dd4e469f752f1 Mon Sep 17 00:00:00 2001 From: wjz Date: Wed, 30 Dec 2015 09:34:33 +0800 Subject: [PATCH 7/8] remove .gitignore from the source control --- .gitignore | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8929b7a..0000000 --- a/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# Maven # -target -/fnlp-dev/target - -# IDEA # -*.iml - -# Eclipse # -.classpath -.project -.settings - -#large files# -/data -/tmp - From 2127632b27940c19c8bf70cc56c193db05bd1d82 Mon Sep 17 00:00:00 2001 From: wjz Date: Wed, 30 Dec 2015 09:34:33 +0800 Subject: [PATCH 8/8] remove .gitignore from the source control --- .gitignore | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8929b7a..0000000 --- a/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# Maven # -target -/fnlp-dev/target - -# IDEA # -*.iml - -# Eclipse # -.classpath -.project -.settings - -#large files# -/data -/tmp -