public static IterablePosting createProximityPostingList(String[] terms, Lexicon<String> lex, PostingIndex<Pointer> invIndex, int blockDistance) throws IOException { int phraseLength = terms.length; IterablePosting[] ips = new IterablePosting[phraseLength]; Pointer[] ps = new Pointer[phraseLength]; for(int i=0;i<phraseLength;i++) { LexiconEntry le = lex.getLexiconEntry(terms[i]); ips[i] = invIndex.getPostings(ps[i] = (Pointer) le); } return createProximityPostingList(ps, invIndex, blockDistance); }
@Override protected IterablePosting createFinalPostingIterator( List<IterablePosting> postings, List<EntryStatistics> pointers) throws IOException { assert postings.size() <= distance; return new ProximityIterablePosting( postings.toArray(new IterablePosting[postings.size()]), pointers.toArray(new EntryStatistics[pointers.size()]), distance); }
boolean isInWindow = isInWindow(otherTermPos, targetPosition);
boolean isInWindow = isInWindow(otherTermPos, targetPosition);
public static IterablePosting createProximityPostingList(String[] terms, Lexicon<String> lex, PostingIndex<Pointer> invIndex, int blockDistance) throws IOException { int phraseLength = terms.length; IterablePosting[] ips = new IterablePosting[phraseLength]; Pointer[] ps = new Pointer[phraseLength]; for(int i=0;i<phraseLength;i++) { LexiconEntry le = lex.getLexiconEntry(terms[i]); ips[i] = invIndex.getPostings(ps[i] = (Pointer) le); } return createProximityPostingList(ps, invIndex, blockDistance); }
@Override protected IterablePosting createFinalPostingIterator( List<IterablePosting> postings, List<EntryStatistics> pointers) throws IOException { assert postings.size() <= distance; return new ProximityIterablePosting( postings.toArray(new IterablePosting[postings.size()]), pointers.toArray(new EntryStatistics[pointers.size()]), distance); }
if (blockDistance > 1) phrase = ProximityIterablePosting.createProximityPostingList(ps, invIndex, blockDistance);
public static IterablePosting createProximityPostingList(Pointer[] ps, PostingIndex<Pointer> invIndex, int blockDistance) throws IOException { IterablePosting[] _ips = new IterablePosting[ps.length]; for (int i = 0; i < ps.length; i++) _ips[i] = invIndex.getPostings(ps[i]); return new ProximityIterablePosting(_ips, ps, blockDistance); }
if (blockDistance > 1) phrase = ProximityIterablePosting.createProximityPostingList(ps, invIndex, blockDistance);
public static IterablePosting createProximityPostingList(Pointer[] ps, PostingIndex<Pointer> invIndex, int blockDistance) throws IOException { IterablePosting[] _ips = new IterablePosting[ps.length]; for (int i = 0; i < ps.length; i++) _ips[i] = invIndex.getPostings(ps[i]); return new ProximityIterablePosting(_ips, ps, blockDistance); }
"At the beginning of your upkeep, if Chance Encounter has ten or more luck counters on it, you win the game." //5 }); IterablePosting ip = ProximityIterablePosting.createProximityPostingList( new String[]{"flip", "coin"}, index.getLexicon(), ip = ProximityIterablePosting.createProximityPostingList( new String[]{"flip", "coin"}, index.getLexicon(), ip = ProximityIterablePosting.createProximityPostingList( new String[]{"flip", "coin"}, index.getLexicon(), ip = ProximityIterablePosting.createProximityPostingList( new String[]{"multiverse", "mana", "screw"}, index.getLexicon(), ip = ProximityIterablePosting.createProximityPostingList( new String[]{"multiverse", "mana", "screw"}, index.getLexicon(), ip = ProximityIterablePosting.createProximityPostingList( new String[]{"multiverse", "mana", "screw"}, index.getLexicon(), ip = ProximityIterablePosting.createProximityPostingList( new String[]{"flip", "coin"}, index.getLexicon(),
"another term dramatis PeRsOnAe term" //5 }); IterablePosting ip = ProximityIterablePosting.createProximityPostingList( new String[]{"dramatis", "personae"}, index.getLexicon(), ip = ProximityIterablePosting.createProximityPostingList( new String[]{"dramatis", "personae"}, index.getLexicon(), ip = ProximityIterablePosting.createProximityPostingList( new String[]{"dramatis", "dramatis"}, index.getLexicon(),