Commit 17b49163ea1c6adc8add35dfa06d93032f4654ee

Authored by bjeanlou
1 parent f48297ea

Update2 treeh

Showing 2 changed files with 6 additions and 6 deletions   Show diff stats
@@ -45,12 +45,12 @@ bool is_followed(const tree t){ @@ -45,12 +45,12 @@ bool is_followed(const tree t){
45 } 45 }
46 46
47 //functions is_end 47 //functions is_end
48 -bool is_end(const tree t){return t->isEnd & 1;}  
49 -bool ends_with_apostrophe(const tree t){return t->isEnd & 2;} 48 +bool is_end(const tree t){return t->isEnd & 13;}//0b00010101
  49 +bool ends_with_apostrophe(const tree t){return t->isEnd & 26;}//0b00101010
50 50
51 -bool is_common_end(const tree t){return !(t->isEnd & 12);}  
52 -bool is_proper_end(const tree t){return t->isEnd & 4;}  
53 -bool is_acronyme_end(const tree t){return t->isEnd & 8;} 51 +bool is_common_end(const tree t){return t->isEnd & 3;}//0b00000011
  52 +bool is_proper_end(const tree t){return t->isEnd & 12;}//0b00001100
  53 +bool is_acronyme_end(const tree t){return t->isEnd & 48;}//0b00110000
54 54
55 int hash(char c){ 55 int hash(char c){
56 //needs to check c wether isalpha 56 //needs to check c wether isalpha
@@ -14,7 +14,7 @@ struct _node{ @@ -14,7 +14,7 @@ struct _node{
14 char letter; 14 char letter;
15 byte isEnd; 15 byte isEnd;
16 //0 no,1 yes,+2 if ends with 's 16 //0 no,1 yes,+2 if ends with 's
17 - //+4if proper, +8if allUpper 17 + //*4 if proper, *16 if allUpper
18 node* next[NBCHAR]; 18 node* next[NBCHAR];
19 }; 19 };
20 20