Finished Fibonacci.
This commit is contained in:
@@ -129,46 +129,3 @@ class AGen implements ISeqGen<String> {
|
|||||||
return state.concat("a");
|
return state.concat("a");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SimpleMarkov implements ISeqGen<String> {
|
|
||||||
|
|
||||||
public String gen(String state) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// The probability of a word.
|
|
||||||
class ProbPair {
|
|
||||||
|
|
||||||
String word; // The word itself.
|
|
||||||
int count; // The number of times the word has appeared after this word.
|
|
||||||
|
|
||||||
ProbPair(String word, int count) {
|
|
||||||
this.word = word;
|
|
||||||
this.count = count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// The probable completions for a word.
|
|
||||||
class Completion {
|
|
||||||
|
|
||||||
String word; // The word the completions are for.
|
|
||||||
ILo<ProbPair> completions; //The probable completions.
|
|
||||||
|
|
||||||
Completion(String word, ILo<ProbPair> completions) {
|
|
||||||
this.word = word;
|
|
||||||
this.completions = completions;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// The list of all known completions.
|
|
||||||
class CompletionTable {
|
|
||||||
|
|
||||||
ILo<Completion> table;
|
|
||||||
|
|
||||||
CompletionTable(ILo<Completion> table) {
|
|
||||||
this.table = table;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class ProcessInput {}
|
|
||||||
|
Reference in New Issue
Block a user