diff options
author | Hieu Hoang <fishandfrolick@gmail.com> | 2012-06-01 02:32:24 +0400 |
---|---|---|
committer | Hieu Hoang <fishandfrolick@gmail.com> | 2012-06-01 02:32:24 +0400 |
commit | 417d5ee57ba980b4a88031550163a218bf9c5a1c (patch) | |
tree | 29662a0db328b4fc5fa3ece97cb5bbf931d79fee /biconcor/TargetCorpus.h | |
parent | 48faedb3bdfe1507d19cf2b76fbc81f3be2ff244 (diff) |
move biconcor to /
Diffstat (limited to 'biconcor/TargetCorpus.h')
-rw-r--r-- | biconcor/TargetCorpus.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/biconcor/TargetCorpus.h b/biconcor/TargetCorpus.h new file mode 100644 index 000000000..5a35356f9 --- /dev/null +++ b/biconcor/TargetCorpus.h @@ -0,0 +1,32 @@ +#pragma once + +#include "Vocabulary.h" + +class TargetCorpus +{ +public: + typedef unsigned int INDEX; + +private: + WORD_ID *m_array; + INDEX *m_sentenceEnd; + Vocabulary m_vcb; + INDEX m_size; + INDEX m_sentenceCount; + + // No copying allowed. + TargetCorpus(const TargetCorpus&); + void operator=(const TargetCorpus&); + +public: + TargetCorpus(); + ~TargetCorpus(); + + void Create(const std::string& fileName ); + WORD GetWordFromId( const WORD_ID id ) const; + WORD GetWord( INDEX sentence, int word ) const; + WORD_ID GetWordId( INDEX sentence, int word ) const; + char GetSentenceLength( INDEX sentence ) const; + void Load(const std::string& fileName ); + void Save(const std::string& fileName ) const; +}; |