Expose triagrams from word
This commit is contained in:
		
							parent
							
								
									94d807fc67
								
							
						
					
					
						commit
						7dd7f5610b
					
				
					 2 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
					@ -32,6 +32,10 @@ Word::Word(const std::string &w) : word(w) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
string Word::get_word() const { return string(); }
 | 
					string Word::get_word() const { return string(); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					vector<std::string> Word::get_triagrams() const {
 | 
				
			||||||
 | 
					    return triagrams;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
unsigned int Word::get_matches(const vector<string> &t) const {
 | 
					unsigned int Word::get_matches(const vector<string> &t) const {
 | 
				
			||||||
    unsigned int matches = 0;
 | 
					    unsigned int matches = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,6 +17,9 @@ class Word {
 | 
				
			||||||
    /** Returns the word */
 | 
					    /** Returns the word */
 | 
				
			||||||
    std::string get_word() const;
 | 
					    std::string get_word() const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /** Returns triagrams */
 | 
				
			||||||
 | 
					  std::vector<std::string> get_triagrams() const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /** Returns how many of the trigrams in t that are present
 | 
					    /** Returns how many of the trigrams in t that are present
 | 
				
			||||||
     in this word's trigram vector */
 | 
					     in this word's trigram vector */
 | 
				
			||||||
    unsigned int get_matches(const std::vector<std::string> &t) const;
 | 
					    unsigned int get_matches(const std::vector<std::string> &t) const;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue