diff options
Diffstat (limited to 'freevars.cpp')
-rw-r--r-- | freevars.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/freevars.cpp b/freevars.cpp deleted file mode 100644 index 4429d00..0000000 --- a/freevars.cpp +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | #include "freevars.h" | ||
2 | #include <fstream> | ||
3 | #include "kgramstats.h" | ||
4 | |||
5 | freevar::freevar(word& w, std::string file) : w(w) | ||
6 | { | ||
7 | std::ifstream infile(file); | ||
8 | if (infile) | ||
9 | { | ||
10 | std::string line; | ||
11 | while (getline(infile, line)) | ||
12 | { | ||
13 | instances.insert(line); | ||
14 | w.forms.add(line); | ||
15 | } | ||
16 | } | ||
17 | } | ||
18 | |||
19 | bool freevar::check(std::string f) const | ||
20 | { | ||
21 | return (instances.count(f) == 1); | ||
22 | } | ||
23 | |||
24 | void freevar::add(std::string f) | ||
25 | { | ||
26 | instances.insert(f); | ||
27 | } | ||
28 | |||
29 | word& freevar::getWord() | ||
30 | { | ||
31 | return w; | ||
32 | } | ||