public static String Title = "";
public Review Parse_Review_Data(String Sentence) {
Review Parsed_Review = new Review();
if (Sentence.contains("[u]") || Sentence.contains("[U]")) {
Parsed_Review.Without_Feature = true;
Sentence = Sentence.replace("[u]", "");
Sentence = Sentence.replace("[U]", "");
}
if (Sentence.contains("[p]") || Sentence.contains("[P]")) {
Parsed_Review.Without_Pronoun_resolution = true;
Sentence = Sentence.replace("[p]", "");
Sentence = Sentence.replace("[P]", "");
}
if (Sentence.contains("[s]") || Sentence.contains("[S]")) {
Parsed_Review.Has_Suggetions = true;
Sentence = Sentence.replace("[s]", "");
Sentence = Sentence.replace("[S]", "");
}
if (Sentence.contains("[CC]") || Sentence.contains("[cc]")) {
Parsed_Review.Has_Comparison_With_Different_Brand = true;
Sentence = Sentence.replace("[CC]", "");
Sentence = Sentence.replace("[cc]", "");
}
if (Sentence.contains("[CS]") || Sentence.contains("[cs]")) {
Parsed_Review.Has_Comparison_With_Same_Brand = true;
Sentence = Sentence.replace("[cs]", "");
Sentence = Sentence.replace("[CS]", "");
}
String[] Parts = Sentence.split("##");
if (Parts.length > 0) {
if (Parts[0].length() < 1) {
System.out.println(" Features: " + "None");
} else {
String[] Features = Parts[0].split(",");
for (String Feature : Features) {
Parsed_Review.Features.add(Get_Feature(Feature));
}
}
}
if (Parts.length > 1) {
Parsed_Review.setDataBody(Parts[1]);
}
System.out.println(Sentence);
Parsed_Review.Review_Title = Title;