-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathStem.cpp
More file actions
56 lines (52 loc) · 1.32 KB
/
Copy pathStem.cpp
File metadata and controls
56 lines (52 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "Lexicon.h"
#include "Stem.h"
#include "Suffix.h"
#include "Signature.h"
CStem::CStem(QString stem) : m_key(stem), m_signature(),m_count(0) {
m_count = 0;
m_json_id = 0;
m_compound_component = 0;
m_word_list_end_point = -1;
m_word_list_start_point= -1;
m_word_type_count = 0;
}
CStem::CStem(CStem& stem) {
m_key = stem.get_key();
m_count = stem.get_count();
//QListIterator<CSignature*> sig_iter(*stem.GetSignatures());
//while (sig_iter.hasNext()){
// m_Signatures.append(sig_iter.next());
//}
m_signature = stem.get_signature();
m_count = 0;
m_json_id = 0;
m_word_type_count = stem.get_word_type_count();
}
CStem::~CStem(){
}
void CStem::add_signature(CSignature *p_new_sig)
{ m_signature = p_new_sig;
/*
foreach (CSignature* p_sig, m_Signatures) {
if (p_sig->get_key() == p_new_sig->get_key())
return;
}
m_Signatures.append(p_new_sig);
*/
}
int CStem::get_word_type_count() {
return m_word_type_count;
}
QString CStem::display(){
return m_key;
}
void CStem::make_compound(QString stem1, QString stem2){
m_compound.first = stem1;
m_compound.second = stem2;
}
bool CStem::is_compound(){
if (m_compound.first.length() > 0 && m_compound.second.length()> 0) {
return true;
}
return false;
}