@@ -0,0 +1,2464 @@
+package com.github.megallo.markoverator.storage;%0A%0Aimport com.github.megallo.markoverator.utils.Pair;%0A%0Aimport java.util.List;%0A%0Apublic interface BigrammerStorage %7B%0A    /*%0A    // TODO replacing calls in Bigrammer is workable but need further refactoring for more compact storage%0A    - model.getFullWordList().size()%0A    - model.getFullWordList().get(seed + 1);%0A    - model.getForwardCache().containsKey(new Pair(seedWord1, seedWord2))%0A    - model.getForwardCache().get(new Pair(word1, word2));%0A    - model.getBackwardCache().get(new Pair(word2, word3));%0A     */%0A%0A    /**%0A     * Return the size of the full word list. Each corpus word maps to an%0A     * integer from 0 to (size - 1).%0A     */%0A    int getFullWordListSize();%0A%0A    /**%0A     * Return the word from the original corpus that corresponds to the given%0A     * index from 0 to the value returned by getFullWordListSize() - 1.%0A     *%0A     * @param index the integer index of the word%0A     * @return the word at the given index%0A     */%0A    String getByIndex(int index);%0A%0A    /**%0A     * Return a list of all possible index locations for the given word or null%0A     * if there are 0 locations.%0A     *%0A     * @param word the word to search for possible index locations%0A     * @return a list of all index locations or null if there are 0%0A     */%0A    List%3CInteger%3E getAllPossibleLocations(String word);%0A%0A    /**%0A     * Returns true if the given word pair exists in the forward chain.%0A     *%0A     * @param wordPair word pair to check%0A     * @return true if the pair exist, false otherwise%0A     */%0A    boolean containsForwardWordList(Pair wordPair);%0A%0A    /**%0A     * For the given word pair in the forward chain, return all possible words%0A     * that might follow it. Higher probability next-words exist with higher%0A     * frequency in the returned list.%0A     *%0A     * @param wordPair a pair of first word followed by second word%0A     * @return list of all possible next words that might immediately follow in the chain%0A     */%0A    List%3CString%3E getForwardWordList(Pair wordPair);%0A%0A    /**%0A     * For the given word pair in the backward chain, return all possible words%0A     * that might precede it. Higher probability previous-words exist with%0A     * higher frequency in the returned list.%0A     *%0A     * @param wordPair a pair of first word followed by second word%0A     * @return list of all possible previous words that might immediately precede in the chain%0A     */%0A    List%3CString%3E getBackwardWordList(Pair wordPair);%0A%7D%0A

Add BigrammerStorage interface