summaryrefslogtreecommitdiff
path: root/extractor/phrase.h
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-01-28 11:56:31 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-01-28 11:56:31 +0000
commit5530575ae0ad939e17f08d6bd49978acea388ab7 (patch)
tree4620a276c1c827d824e285148f4f4a5bf781ebfe /extractor/phrase.h
parentce6937f136a38af93d9a5cd9628acc712da95543 (diff)
Initial working commit.
Diffstat (limited to 'extractor/phrase.h')
-rw-r--r--extractor/phrase.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/extractor/phrase.h b/extractor/phrase.h
new file mode 100644
index 00000000..5a5124d9
--- /dev/null
+++ b/extractor/phrase.h
@@ -0,0 +1,29 @@
+#ifndef _PHRASE_H_
+#define _PHRASE_H_
+
+#include <string>
+#include <vector>
+
+#include "phrase_builder.h"
+
+using namespace std;
+
+class Phrase {
+ public:
+ friend Phrase PhraseBuilder::Build(const vector<int>& phrase);
+
+ int Arity() const;
+
+ int GetChunkLen(int index) const;
+
+ vector<int> Get() const;
+
+ int GetSymbol(int position) const;
+
+ private:
+ vector<int> symbols;
+ vector<int> var_pos;
+ vector<string> words;
+};
+
+#endif