about summary refs log tree commit diff stats
path: root/freevars.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'freevars.cpp')
-rw-r--r--freevars.cpp32
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
5freevar::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
19bool freevar::check(std::string f) const
20{
21 return (instances.count(f) == 1);
22}
23
24void freevar::add(std::string f)
25{
26 instances.insert(f);
27}
28
29word& freevar::getWord()
30{
31 return w;
32}