chinese-journal/rudict/rudict/other.h

48 lines
700 B
C++

#ifndef OTHER_H_INCLUDED
#define OTHER_H_INCLUDED
#include <string>
#include <map>
#include <set>
#include <vector>
#include <fstream>
#include "boost/algorithm/string.hpp"
namespace OT
{
struct OtherWordRecord
{
std::wstring word;
std::wstring type;
OtherWordRecord();
OtherWordRecord(std::wstring line);
bool operator<(const OtherWordRecord& other) const
{
if (word != other.word)
{
return word < other.word;
}
else
{
return type < other.type;
}
}
};
extern std::vector<OtherWordRecord> OtherWordRecordArr;
std::set<OtherWordRecord> RecognizeWord(std::wstring word);
void LoadWordSet(std::string filename);
}
#endif //OTHER_H_INCLUDED