/// <summary> /// Reads whole file and process it. /// </summary> internal void Iterate() { var freeBaseStreamReader = new StreamReader(File); string line; while ((line = freeBaseStreamReader.ReadLine()) != null) { var splits = line.Split('\t'); var source = new FreeBaseNode(splits[0]); var edge = new FreeBaseEdge(splits[1]); var target = new FreeBaseNode(splits[2]); ProcessEntry(source, edge, target); ++_tripletProcessed; if (_tripletProcessed % ProcessedCountThreshold == 0) { if (ProgressReporter != null) { ProgressReporter(_tripletProcessed); } } } }
internal SimpleQuestionEntry(string entryLine) { var tokens = entryLine.Split('\t'); SupportFact = new FreeBaseNode(tokens[0]); Edge = new FreeBaseEdge(tokens[1]); Answer = new FreeBaseNode(tokens[2]); Question = tokens[3]; }
protected abstract void ProcessEntry(FreeBaseNode source, FreeBaseEdge edge, FreeBaseNode target);
internal FreeBaseTriplet(FreeBaseNode source, FreeBaseEdge edge, FreeBaseNode target) { Source = source; Edge = edge; Target = target; }