23namespace LinguisticProcessing
30 const std::vector<std::pair<Common::AccessSubWordIterator,Common::AccessSubWordIterator> >& accessItrs,
32 m_accessItrs(accessItrs),
39const std::pair<uint64_t,DictionaryEntry>
44 auto indexItr = indexes.begin();
45 auto offset = std::numeric_limits< uint64_t >::max();
46 for (
auto it = m_accessItrs.cbegin();
47 it != m_accessItrs.cend(); it++, indexItr++)
49 if (it->first != it->second)
51 auto data = *(it->first);
52 if (data.first < offset)
55 std::fill(indexes.begin(), indexes.end(), 0);
56 *indexItr = data.second;
58 else if (data.first == offset)
60 *indexItr = data.second;
64 return std::make_pair(offset, m_dico.
getEntry(indexes));
76 auto offset = std::numeric_limits<uint64_t>::max();
77 for (
auto accessItr : m_accessItrs)
79 if (accessItr.first != accessItr.second)
81 auto data = *(accessItr.first);
82 if (data.first < offset)
89 for (
auto accessItr : m_accessItrs)
91 if (accessItr.first != accessItr.second)
93 auto data = *(accessItr.first);
94 if (data.first == offset)
107 return m_accessItrs == it.m_accessItrs;
113 return m_accessItrs != it.m_accessItrs;
118 const std::vector<Common::AccessSuperWordIterator>& it) :
126 m_accessItrs(source.m_accessItrs)
141 std::cerr <<
"unimplemented method at "<<__FILE__<<
", line "<<__LINE__<<std::endl;
150 std::cerr <<
"unimplemented method at "<<__FILE__<<
", line "<<__LINE__<<std::endl;
163 std::cerr <<
"unimplemented method at "<<__FILE__<<
", line "<<__LINE__<< std::endl;
bool operator==(const AbstractDictionarySubWordIterator &it) const override
bool operator!=(const AbstractDictionarySubWordIterator &it) const override
virtual const std::pair< uint64_t, DictionaryEntry > operator*() const override
return subword data SubWord data are the ending offset of the subword, \ and the corresponding dictio...
virtual AbstractDictionarySubWordIterator * clone() const override
virtual ~MultiLevelAnalysisDictionarySubWordIterator()
MultiLevelAnalysisDictionarySubWordIterator(const std::vector< std::pair< Common::AccessSubWordIterator, Common::AccessSubWordIterator > > &accessItr, const MultiLevelAnalysisDictionary &dico)
MultiLevelAnalysisDictionarySubWordIterator & operator++(int i) override
virtual const LimaString operator*() const override
return superword
bool operator==(const AbstractDictionarySuperWordIterator &it) const override
MultiLevelAnalysisDictionarySuperWordIterator(const std::vector< Common::AccessSuperWordIterator > &i)
virtual AbstractDictionarySuperWordIterator * clone() const override
bool operator!=(const AbstractDictionarySuperWordIterator &it) const override
MultiLevelAnalysisDictionarySuperWordIterator & operator++(int i) override
virtual ~MultiLevelAnalysisDictionarySuperWordIterator()
uint64_t getDictionaryCount() const
virtual DictionaryEntry getEntry(const Lima::LimaString &word) const override
get dictionary entry for a word