Skip to content

Commit

Permalink
和楼上电脑同步了下。
Browse files Browse the repository at this point in the history
Merge branch 'master' of https://gitee.com/DetaChina/DetaParser.git

Conflicts:
	.project
	README.md
	wordSegment/org/tinos/engine/nlp/imp/NLPControllerImp.java
	wordSegment/org/tinos/engine/pos/POSController.java
	wordSegment/org/tinos/engine/pos/imp/POSControllerImp.java
	wordSegment/org/tinos/ortho/fhmm/imp/poscc.lyg
	wordSegment/org/tinos/ortho/fhmm/imp/poscj.lyg
	wordSegment/org/tinos/ortho/fhmm/imp/postt.lyg
  • Loading branch information
Lenovo LYG authored and Lenovo LYG committed Jun 7, 2019
2 parents e1859fb + d9dfc2e commit e34d2f3
Show file tree
Hide file tree
Showing 17 changed files with 85 additions and 23 deletions.
13 changes: 13 additions & 0 deletions .gitee/ISSUE_TEMPLATE.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### 该问题是怎么引起的?



### 重现步骤



### 报错信息




Binary file added .gradle/5.0/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/5.0/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/5.0/fileHashes/fileHashes.lock
Binary file not shown.
Empty file added .gradle/5.0/gc.properties
Empty file.
Empty file added .gradle/vcs-1/gc.properties
Empty file.
4 changes: 2 additions & 2 deletions .project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Deta_Parser</name>
<projectDescription>
<name>Deta_Parser</name>
<comment></comment>
<projects>
</projects>
Expand Down
5 changes: 5 additions & 0 deletions .settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<<<<<<< HEAD
connection.project.dir=
eclipse.preferences.version=1
=======
arguments=
auto.sync=false
build.scans.enabled=false
Expand All @@ -11,3 +15,4 @@ offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
>>>>>>> branch 'master' of https://gitee.com/DetaChina/DetaParser.git
36 changes: 36 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 德塔中文分词分析word segementation

#### Description
电脑偶尔登不上 https://github.com/yaoguangluo/DetaParser,就在码云上2选1发布.

#### Software Architecture
Software architecture description

#### Installation

1. xxxx
2. xxxx
3. xxxx

#### Instructions

1. xxxx
2. xxxx
3. xxxx

#### Contribution

1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request


#### Gitee Feature

1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# <<100%(首创)个人著作权开源项目 软著登字第3951366号>>🔥26,000/ms word segment for text mining of NLP, POS, AI and Deep learning/每秒中文混合分词2200~3000万词汇的高精准确率快速神经网络分词包. 训练词意分析, 词感分析, 词境分析, 词灵分析并自由扩充词库 免费的官方互动展示页地址: http://tinos.qicp.vip/data.html
###### 项目使用说明书 10.6.1版本地址:
https://github.com/yaoguangluo/AOPM_VPCS_Theroy/blob/master/%E6%B5%8F%E9%98%B3%E5%BE%B7%E5%A1%94%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8%20%E8%AF%AD%E8%A8%80%E5%9B%BE%E7%81%B5%E5%B7%A5%E7%A8%8BAPI%E8%AF%B4%E6%98%8E%E4%B9%A6_10_6_1_5.doc

![实例](https://github.com/yaoguangluo/Deta_Parser/blob/master/DETA%2020190524.jpg)
## 版本号:11.1.1 : 4字词卷积催化函数 准备整体卡诺图化简, 和PCA阀门优化. 2019-05-23 字长卷积小表 已经 应用了(新增4表). 2019-05-27 0:11 M
## 版本号:11.1.0: 随机测试文章来自 360八卦新闻推荐, 腾讯门户, 163门户等,总计110多篇文章, 约5万字, 算法问题导致错误分词1个(错误率十万分之三),词库缺少导致错误7个(错误率万分之三), <中文分析错误率小于亿分之一> 是一个艰巨的主题. 算法问题的扩充 时时更新在 HUB上.2019-05-25 22:48 M
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<<<<<<< HEAD
group 'DetaNLP'
=======
group 'Deta_Parser'
>>>>>>> branch 'master' of https://gitee.com/DetaChina/DetaParser.git
version '1.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.8
Expand Down
4 changes: 4 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
* in the user guide at https://docs.gradle.org/4.10.3/userguide/multi_project_builds.html
*/

<<<<<<< HEAD
rootProject.name = 'DetaNLP'
=======
rootProject.name = 'Deta_Parser'
>>>>>>> branch 'master' of https://gitee.com/DetaChina/DetaParser.git
16 changes: 8 additions & 8 deletions wordSegment/org/tinos/engine/nlp/imp/NLPControllerImp.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public class NLPControllerImp implements NLPController{
public int doSlangPartAndPOSCheckForTwoChar(int countInputStringLength, List<String> outputList
, StringBuilder stringBuilder, Map<String, String> wordsForest, StringBuilder[] prefixWord
, POSController posUtils, int charPosition, String textInputString){
String countWordNode= stringBuilder.toString();
String countWordNode= stringBuilder.toString();
if (StableData.INT_ZERO== prefixWord[StableData.INT_ZERO].length()){
if(StableMaps.CiTwo.containsKey(countWordNode)) {
if(StableMaps.CiTwo.containsKey(countWordNode)) {
prefixWord[StableData.INT_ZERO].delete(StableData.INT_ZERO, prefixWord[StableData.INT_ZERO].length());
prefixWord[StableData.INT_ZERO].append(countWordNode);
outputList.add(countWordNode);
Expand Down Expand Up @@ -44,8 +44,8 @@ public int doSlangPartAndPOSCheckForTwoChar(int countInputStringLength, List<Str
return countInputStringLength;
}
}
}
if (StableMaps.CiTwo.containsKey(countWordNode)){
}
if (StableMaps.CiTwo.containsKey(countWordNode)){
prefixWord[StableData.INT_ZERO].delete(StableData.INT_ZERO, prefixWord[StableData.INT_ZERO].length());
prefixWord[StableData.INT_ZERO].append(countWordNode);
outputList.add(countWordNode);
Expand Down Expand Up @@ -170,10 +170,10 @@ public int doSlangCheck(int countInputStringLength, List<String> output, StringB
+ prefixWord[StableData.INT_ONE].charAt(StableData.INT_ZERO))) {
countInputStringLength= doPOSAndEMMCheckOfThree(--countInputStringLength, output, wordsForest
, stringBuilder.delete(StableData.INT_THREE, StableData.INT_FOUR), prefixWord, posUtils, charPosition, textInputString);
return countInputStringLength;
return countInputStringLength;
}
if (StableMaps.CiTwo.containsKey(preRegister)){
if (StableMaps.CiTwo.containsKey(postRegister)){
if (StableMaps.CiTwo.containsKey(postRegister)){
String string= StableData.EMPTY_STRING+ inputString.charAt(StableData.INT_ZERO);
if(StableMaps.xingWeiCi.containsKey(prefixWord[StableData.INT_ZERO].toString())
&&StableMaps.shiTaiCi.containsKey(string)) {
Expand All @@ -198,8 +198,8 @@ public int doSlangCheck(int countInputStringLength, List<String> output, StringB
prefixWord[StableData.INT_ZERO].append(preRegister);
return countInputStringLength-StableData.INT_TWO;
}
}
if(StableMaps.CiThree.containsKey(preRegister+ inputString.charAt(StableData.INT_TWO))&& !StableMaps.CiTwo.containsKey(postRegister)) {
}
if(StableMaps.CiThree.containsKey(preRegister+ inputString.charAt(StableData.INT_TWO))&& !StableMaps.CiTwo.containsKey(postRegister)) {
prefixWord[StableData.INT_ZERO].delete(StableData.INT_ZERO, prefixWord[StableData.INT_ZERO].length());
prefixWord[StableData.INT_ZERO].append(preRegister+ inputString.charAt(StableData.INT_TWO));
output.add(preRegister+ inputString.charAt(StableData.INT_TWO));
Expand Down
2 changes: 1 addition & 1 deletion wordSegment/org/tinos/engine/pos/POSController.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ void didNotFindFirstCharForMap(Map<String, WordFrequency> outputList, String[] s
, Map<String, String> wordsForest);

int parserFirstCharOfThreeForMap(int countInputStringLength, Map<String, WordFrequency> outputList, String[] strings
, StringBuilder[] fixWord, Map<String, String> wordsForest);
, StringBuilder[] fixWord, Map<String, String> wordsForest);
}

18 changes: 9 additions & 9 deletions wordSegment/org/tinos/engine/pos/imp/POSControllerImp.java
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ public int chuLiLianCiPostFixOfThree(Map<String, String> wordsForest, List<Strin
if (StableMaps.lianCi.containsKey(strings[StableData.INT_TWO])){
countInputLength= parserFirstCharOfThree(countInputLength, outputList, strings, prefixWord);
return countInputLength;
}
if (StableMaps.CiTwo.containsKey(strings[StableData.INT_ONE])){
}
if (StableMaps.CiTwo.containsKey(strings[StableData.INT_ONE])){
countInputLength= parserFirstTwoCharOfThree(countInputLength, outputList, strings, prefixWord);
return countInputLength;
}
Expand Down Expand Up @@ -401,8 +401,8 @@ public int chuLiZhuCiOfThree(Map<String, String> wordsForest, List<String> outpu
return countInputStringLength;
}
if (wordsForest.containsKey(fixWord[StableData.INT_ZERO].toString())){
if (StableMaps.dongCi.containsKey(fixWord[StableData.INT_ZERO].toString())){
if(StableMaps.CiTwo.containsKey(strings[StableData.INT_TWO])) {
if (StableMaps.dongCi.containsKey(fixWord[StableData.INT_ZERO].toString())){
if(StableMaps.CiTwo.containsKey(strings[StableData.INT_TWO])) {
countInputStringLength = parserFirstCharOfThree(countInputStringLength, outputList, strings, fixWord);
return countInputStringLength;
}
Expand Down Expand Up @@ -476,8 +476,8 @@ public int chuLiJieCiOfThree(Map<String, String> wordsForest, List<String> outpu
outputList.add(strings[StableData.INT_TWO]);
fixWord[StableData.INT_ZERO].delete(StableData.INT_ZERO, fixWord[StableData.INT_ZERO].length());
fixWord[StableData.INT_ZERO].append(strings[StableData.INT_TWO]);
return countInputStringLength;
}else if (StableMaps.CiTwo.containsKey(strings[StableData.INT_ONE])){
return countInputStringLength;
}else if (StableMaps.CiTwo.containsKey(strings[StableData.INT_ONE])){
if(StableMaps.jieCi.containsKey(strings[StableData.INT_ONE])) {
countInputStringLength= parserFirstTwoCharOfThree(countInputStringLength, outputList, strings, fixWord);
return countInputStringLength;
Expand All @@ -499,7 +499,7 @@ public int chuLiJieCiOfThree(Map<String, String> wordsForest, List<String> outpu
if(StableMaps.jieCi.containsKey(strings[StableData.INT_ONE])) {
countInputStringLength= parserFirstTwoCharOfThree(countInputStringLength, outputList, strings, fixWord);
return countInputStringLength;
}
}
outputList.add(strings[StableData.INT_ZERO]);
if(StableMaps.CiTwo.containsKey(strings[StableData.INT_TWO])) {
outputList.add(strings[StableData.INT_TWO]);
Expand All @@ -509,7 +509,7 @@ public int chuLiJieCiOfThree(Map<String, String> wordsForest, List<String> outpu
}
fixWord[StableData.INT_ZERO].delete(StableData.INT_ZERO, fixWord[StableData.INT_ZERO].length());
fixWord[StableData.INT_ZERO].append(strings[StableData.INT_ZERO]);
return countInputStringLength= StableData.INT_ONE;
return countInputStringLength= StableData.INT_ONE;
}

public int chuLiLiangCiOfThree(Map<String, String> wordsForest, List<String> outputList, int countInputStringLength
Expand Down Expand Up @@ -848,5 +848,5 @@ public int parserFirstCharOfThreeForMap(int countInputStringLength, Map<String,
return countInputStringLength;
}
return countInputStringLength;
}
}
}
1 change: 1 addition & 0 deletions wordSegment/org/tinos/ortho/fhmm/imp/symbol.lyg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4 changes: 2 additions & 2 deletions wordSegment/org/tinos/test/DemoPOSforSpecial.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static void main(String[] args) throws IOException {
Map<String, String> nlp = analyzer.getPosCnToCn();
List<String> sets = new ArrayList<>();
String[] ss = new String[1];
String[] ss1 = new String[1];
String[] ss1 = new String[1];
ss[0] = "存在这是非常常是非常愚蠢的为主要求知不断的提高自身的知识的不锻炼改变化";
ss1[0] = "나는 일을 준비 하고 있다 ";
for (int i = 0; i < ss.length; i++) {
Expand All @@ -34,7 +34,7 @@ public static void main(String[] args) throws IOException {
out.println(sets.get(k) + "/" + nlp.get(sets.get(k)) + " ");
}
}
out.println("");
out.println("");
}
}
}

0 comments on commit e34d2f3

Please sign in to comment.