public class IndexMaps extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
String[] |
idWord
uid to word
|
String |
rootString
ROOT
|
| Constructor and Description |
|---|
IndexMaps(HashMap<String,Integer> wordId,
HashMap<Integer,Integer> labels,
String rootString,
HashMap<Integer,Integer> brown4Clusters,
HashMap<Integer,Integer> brown6Clusters,
HashMap<String,Integer> brownFullClusters) |
| Modifier and Type | Method and Description |
|---|---|
int[] |
clusterId(String word)
获取聚类id
|
HashMap<Integer,Integer> |
getLabels()
依存关系
|
HashMap<String,Integer> |
getWordId() |
boolean |
hasClusters() |
Sentence |
makeSentence(String[] words,
String[] posTags,
boolean rootFirst,
boolean lowerCased)
将句子中的字符串转换为id
|
public final String rootString
public String[] idWord
public Sentence makeSentence(String[] words, String[] posTags, boolean rootFirst, boolean lowerCased)
words - posTags - rootFirst - lowerCased - public int[] clusterId(String word)
word - public boolean hasClusters()
Copyright © 2014–2021 码农场. All rights reserved.