Пример #1
0
 public static String getSentence(String fileName, int lineIdx) {
   DocLine dl = DocLine.getDocLine(RelationExtractor.getDoclines(), lineIdx, fileName);
   if (dl == null) {
     return null;
   }
   return dl.getContent();
 }
Пример #2
0
 public static String getWords(String fileName, int lineIndex, int start, int end) {
   DocLine dl = DocLine.getDocLine(RelationExtractor.getDoclines(), lineIndex, fileName);
   if (dl == null) {
     System.out.println(
         "file " + fileName + " line " + lineIndex + " start " + start + " end " + end);
     return null;
   }
   return getWords(dl.getContent(), start - 1, end - 1);
 }
Пример #3
0
 public static String getWord(String fileName, int lineIndex, int position) {
   DocLine dl = DocLine.getDocLine(RelationExtractor.getDoclines(), lineIndex, fileName);
   if (dl == null) return null;
   return getWord(dl.getContent(), position - 1);
 }