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); }
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); }
if (blockDistance > 1) phrase = ProximityIterablePosting.createProximityPostingList(ps, invIndex, blockDistance);
if (blockDistance > 1) phrase = ProximityIterablePosting.createProximityPostingList(ps, invIndex, 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(),