public class CoNLLReader extends Object
| Constructor and Description |
|---|
CoNLLReader(String filePath)
Initializes the file reader
|
| Modifier and Type | Method and Description |
|---|---|
static IndexMaps |
createIndices(String conllPath,
boolean labeled,
boolean lowercased,
String clusterFile)
读取CoNLL文件,创建索引
|
ArrayList<Instance> |
readData(int limit,
boolean keepNonProjective,
boolean labeled,
boolean rootFirst,
boolean lowerCased,
IndexMaps maps)
读取句子
|
ArrayList<CompactTree> |
readStringData() |
public CoNLLReader(String filePath) throws FileNotFoundException
filePath - Path to the fileException - If the file path is not correct or there are not enough permission to read the fileFileNotFoundExceptionpublic static IndexMaps createIndices(String conllPath, boolean labeled, boolean lowercased, String clusterFile) throws IOException
conllPath - labeled - lowercased - clusterFile - ExceptionIOExceptionpublic ArrayList<Instance> readData(int limit, boolean keepNonProjective, boolean labeled, boolean rootFirst, boolean lowerCased, IndexMaps maps) throws IOException
limit - 最大多少句keepNonProjective - 保留非投影labeled - rootFirst - 是否把root放到最前面lowerCased - maps - feature id mapExceptionIOExceptionpublic ArrayList<CompactTree> readStringData() throws IOException
IOExceptionCopyright © 2014–2021 码农场. All rights reserved.