Added GOS normalized words analysis in letter extraction + Fixing normalized words bugs with anonymous names in GOS (when extracting data with in collocability)
This commit is contained in:
@@ -27,6 +27,10 @@ public final class MultipleHMKeys2 implements MultipleHMKeys {
|
||||
String[] splitedK1 = k1.split("\\s+");
|
||||
String[] splitedK2 = k2.split("\\s+");
|
||||
for(int i = 0; i < splitedK1.length; i ++){
|
||||
// in GOS words and normalized words may not both have specific word due to anon
|
||||
if(!(i < splitedK2.length)){
|
||||
continue;
|
||||
}
|
||||
MultipleHMKeys search = new MultipleHMKeys2(splitedK1[i], splitedK2[i]);
|
||||
r.add(search);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,10 @@ public final class MultipleHMKeys3 implements MultipleHMKeys {
|
||||
String[] splitedK2 = k2.split("\\s+");
|
||||
String[] splitedK3 = k3.split("\\s+");
|
||||
for(int i = 0; i < splitedK1.length; i ++){
|
||||
// in GOS words and normalized words may not both have specific word due to anon
|
||||
if(!(i < splitedK2.length && i < splitedK3.length)){
|
||||
continue;
|
||||
}
|
||||
MultipleHMKeys search = new MultipleHMKeys3(splitedK1[i], splitedK2[i], splitedK3[i]);
|
||||
r.add(search);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,10 @@ public final class MultipleHMKeys4 implements MultipleHMKeys {
|
||||
String[] splitedK3 = k3.split("\\s+");
|
||||
String[] splitedK4 = k4.split("\\s+");
|
||||
for(int i = 0; i < splitedK1.length; i ++){
|
||||
// in GOS words and normalized words may not both have specific word due to anon
|
||||
if(!(i < splitedK2.length && i < splitedK3.length && i < splitedK4.length)){
|
||||
continue;
|
||||
}
|
||||
MultipleHMKeys search = new MultipleHMKeys4(splitedK1[i], splitedK2[i], splitedK3[i], splitedK4[i]);
|
||||
r.add(search);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,10 @@ public final class MultipleHMKeys5 implements MultipleHMKeys {
|
||||
String[] splitedK4 = k4.split("\\s+");
|
||||
String[] splitedK5 = k5.split("\\s+");
|
||||
for(int i = 0; i < splitedK1.length; i ++){
|
||||
// in GOS words and normalized words may not both have specific word due to anon
|
||||
if(!(i < splitedK2.length && i < splitedK3.length && i < splitedK4.length && i < splitedK5.length)){
|
||||
continue;
|
||||
}
|
||||
MultipleHMKeys search = new MultipleHMKeys5(splitedK1[i], splitedK2[i], splitedK3[i], splitedK4[i], splitedK5[i]);
|
||||
r.add(search);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,14 @@ public interface Word {
|
||||
if (cvv) {
|
||||
returnValue = (calculateFor == CalculateFor.WORD || calculateFor == CalculateFor.LOWERCASE_WORD) ? getCVVWord(cf) : getCVVLemma(cf);
|
||||
} else {
|
||||
returnValue = (calculateFor == CalculateFor.WORD || calculateFor == CalculateFor.LOWERCASE_WORD) ? getWord(cf) : getLemma(cf);
|
||||
if (calculateFor == CalculateFor.WORD || calculateFor == CalculateFor.LOWERCASE_WORD){
|
||||
returnValue = getWord(cf);
|
||||
} else if (calculateFor == CalculateFor.LEMMA) {
|
||||
returnValue = getLemma(cf);
|
||||
} else if (calculateFor == CalculateFor.NORMALIZED_WORD){
|
||||
returnValue = getNormalizedWord(cf);
|
||||
}
|
||||
// returnValue = (calculateFor == CalculateFor.WORD || calculateFor == CalculateFor.LOWERCASE_WORD) ? getWord(cf) : getLemma(cf);
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
|
||||
Reference in New Issue
Block a user