Skip to content

Commit

Permalink
remove suffix numbers for topic class extraction featurs
Browse files Browse the repository at this point in the history
  • Loading branch information
seyyaw committed Jul 5, 2015
1 parent 797c1de commit 29b1b22
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,20 @@ public List<Feature> apply(Feature feature)
Object featureValue = feature.getValue();

if (featureValue == null) {
return Collections.singletonList(new Feature("TopicClass1", "NA"));
return Collections.singletonList(new Feature("TopicClass", "NA"));
}
String value = featureValue.toString();
if (value == null || value.length() == 0) {
return Collections.singletonList(new Feature("TopicClass1", "NA"));
return Collections.singletonList(new Feature("TopicClass", "NA"));
}

String output;
output = topicClass1.get(value);
// System.out.println("Size:"+i);
if (output != null) {
return Collections.singletonList(new Feature("TopicClass1", output));
return Collections.singletonList(new Feature("TopicClass", output));
}
return Collections.singletonList(new Feature("TopicClass1", "NA"));
return Collections.singletonList(new Feature("TopicClass", "NA"));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,20 @@ public List<Feature> apply(Feature feature)
Object featureValue = feature.getValue();

if (featureValue == null) {
return Collections.singletonList(new Feature("TopicClass2", "NA"));
return Collections.singletonList(new Feature("TopicClass", "NA"));
}
String value = featureValue.toString();
if (value == null || value.length() == 0) {
return Collections.singletonList(new Feature("TopicClass2", "NA"));
return Collections.singletonList(new Feature("TopicClass", "NA"));
}

String output;
output = topicClass2.get(value);
// System.out.println("Size:"+i);
if (output != null) {
return Collections.singletonList(new Feature("TopicClass2", output));
return Collections.singletonList(new Feature("TopicClass", output));
}
return Collections.singletonList(new Feature("TopicClass2", "NA"));
return Collections.singletonList(new Feature("TopicClass", "NA"));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,20 @@ public List<Feature> apply(Feature feature)
Object featureValue = feature.getValue();

if (featureValue == null) {
return Collections.singletonList(new Feature("TopicClass3", "NA"));
return Collections.singletonList(new Feature("TopicClass", "NA"));
}
String value = featureValue.toString();
if (value == null || value.length() == 0) {
return Collections.singletonList(new Feature("TopicClass3", "NA"));
return Collections.singletonList(new Feature("TopicClass", "NA"));
}

String output;
output = topicClass3.get(value);
// System.out.println("Size:"+i);
if (output != null) {
return Collections.singletonList(new Feature("TopicClass3", output));
return Collections.singletonList(new Feature("TopicClass", output));
}
return Collections.singletonList(new Feature("TopicClass3", "NA"));
return Collections.singletonList(new Feature("TopicClass", "NA"));

}

Expand Down

0 comments on commit 29b1b22

Please sign in to comment.