public ParallelText(IText sourceText, IText targetText, ITextAlignmentCollection textAlignmentCollection = null, IComparer <object> segmentRefComparer = null) { SourceText = sourceText; TargetText = targetText; TextAlignmentCollection = textAlignmentCollection; _segmentRefComparer = segmentRefComparer ?? Comparer <object> .Default; }
public ITextAlignmentCollection GetTextAlignmentCollection(string id) { ITextAlignmentCollection alignments = _corpus.GetTextAlignmentCollection(id); if (_filter(alignments)) { return(alignments); } throw new KeyNotFoundException(); }
public bool TryGetTextAlignmentCollection(string id, out ITextAlignmentCollection alignments) { if (_corpus.TryGetTextAlignmentCollection(id, out alignments)) { if (_filter(alignments)) { return(true); } alignments = null; } return(false); }
public bool TryGetTextAlignmentCollection(string id, out ITextAlignmentCollection textAlignmentCollection) { return(_textAlignmentCollections.TryGetValue(id, out textAlignmentCollection)); }