From 65c1714039bfe31b748e10ca5fb7c0b78a4829e5 Mon Sep 17 00:00:00 2001
From: shikeying <pxzsky@163.com>
Date: 星期二, 26 三月 2024 18:06:36 +0800
Subject: [PATCH] 更新milvus库,添加测试方法

---
 walker-text-semantics/src/main/java/com/walker/semantics/InputWord.java |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/walker-text-semantics/src/main/java/com/walker/semantics/InputWord.java b/walker-text-semantics/src/main/java/com/walker/semantics/InputWord.java
index 0154f51..bc075c1 100644
--- a/walker-text-semantics/src/main/java/com/walker/semantics/InputWord.java
+++ b/walker-text-semantics/src/main/java/com/walker/semantics/InputWord.java
@@ -20,19 +20,19 @@
 
 	private String srcText;
 	private List<WordMeta> wordList = new ArrayList<>(8);
-	
+
 	private int total = 0;	// 鎬诲垎璇嶆暟閲忥紙鍖呭惈閲嶅鐨勶級
-	
+
 //	// 浠ヤ笅涓哄垎鏋愯涔変娇鐢ㄧ殑灞炴��
 //	// 鏄惁瀛樺湪鏃堕棿璇嶏紝鎹鍙喅瀹氭槸鍚﹁В鏋愭椂闂�
 //	private boolean hasWordTime = false;
-	
+
 	// 娣诲姞灞炴�э紝鐢ㄤ簬鏍规嵁璇嶇殑鍚嶇О鏌ユ壘鍏冩暟鎹紝2020-12-23
 	private Map<String, WordMeta> wordMetaCache = new HashMap<>(16);
-	
+
 	private int sceneContextId = 0;
 	private String user;
-	
+
 	public InputWord(String srcWords){
 		if(SemanticsUtils.isEmpty(srcWords)){
 			throw new IllegalArgumentException("srcWords is required!");
@@ -46,6 +46,9 @@
 			sp = SpeechPart.toSpeechPart(t.getNatureStr());
 			if(sp.isFocus()){
 				this.addWordMeta(new WordMeta(t.getName(), sp));
+			} else {
+//				System.out.println("涓嶅叧娉ㄧ殑璇嶏細" + t.getName());
+//				this.addWordMeta(new WordMeta(t.getName(), sp));
 			}
 		}
 	}
@@ -60,11 +63,11 @@
 		this.wordList.add(wm);
 		this.total++;
 	}
-	
+
 	public String getSrcText(){
 		return this.srcText;
 	}
-	
+
 	public List<WordMeta> getWordMetaList(){
 		return this.wordList;
 	}
@@ -76,7 +79,7 @@
 	public int getTotal() {
 		return total;
 	}
-	
+
 	/**
 	 * 杩斿洖璇嶅厓鐨刴ap瀵硅薄锛宬ey = 鍗曡瘝
 	 * @return
@@ -84,7 +87,7 @@
 	public Map<String, WordMeta> getWordMetaMap(){
 		return this.wordMetaCache;
 	}
-	
+
 	/**
 	 * 杩斿洖璇彞鐨勯暱搴�
 	 * @return
@@ -92,7 +95,7 @@
 	public int getTextLength(){
 		return this.srcText.length();
 	}
-	
+
 	/**
 	 * 鏍规嵁绱㈠紩杩斿洖鍗曡瘝璇嶅厓
 	 * @param index
@@ -104,7 +107,7 @@
 		}
 		return this.wordList.get(index);
 	}
-	
+
 	@Override
 	public String toString(){
 		return this.wordList.toString();

--
Gitblit v1.9.1