summaryrefslogtreecommitdiff
path: root/src/word_db.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-10-18 16:55:21 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-10-18 16:55:21 +0100
commit4f2584a091f34cdb3eb0dda116709ef95fc34732 (patch)
tree8782f400ee5ba2cf8d64dd0e2a7a9f732376566c /src/word_db.hh
parent944d8f53fb958e71d4763819f9863e3de9457aa7 (diff)
Experiment with ranked word completion depending on word boundaries
Diffstat (limited to 'src/word_db.hh')
-rw-r--r--src/word_db.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/word_db.hh b/src/word_db.hh
index ad0dbadc..4854e881 100644
--- a/src/word_db.hh
+++ b/src/word_db.hh
@@ -38,6 +38,15 @@ public:
return res;
}
+ struct RankedWord
+ {
+ StringView word;
+ int rank;
+ };
+ using RankedWordList = Vector<RankedWord>;
+
+ RankedWordList find_matching(StringView str);
+
int get_word_occurences(StringView word) const;
private:
void update_db();