diff --git a/lab2/word.cc b/lab2/word.cc index 4e89ae4..c1f73f6 100644 --- a/lab2/word.cc +++ b/lab2/word.cc @@ -32,6 +32,10 @@ Word::Word(const std::string &w) : word(w) { string Word::get_word() const { return string(); } +vector Word::get_triagrams() const { + return triagrams; +} + unsigned int Word::get_matches(const vector &t) const { unsigned int matches = 0; diff --git a/lab2/word.h b/lab2/word.h index babe27e..eb927a2 100644 --- a/lab2/word.h +++ b/lab2/word.h @@ -17,6 +17,9 @@ class Word { /** Returns the word */ std::string get_word() const; + /** Returns triagrams */ + std::vector get_triagrams() const; + /** Returns how many of the trigrams in t that are present in this word's trigram vector */ unsigned int get_matches(const std::vector &t) const;