diff options
author | S129778 <S129778@S129778.campus.tue.nl> | 2014-05-15 15:01:29 +0200 |
---|---|---|
committer | S129778 <S129778@S129778.campus.tue.nl> | 2014-05-15 15:11:59 +0200 |
commit | d8162eb3e3d5b6008314cfdafd714c90632e0354 (patch) | |
tree | 8952961d38f363d69b900586cc420cb94e4fc393 /src | |
parent | 627b3dd7aa3597eb049f9996492198686dc138d2 (diff) | |
download | Goldfarmer-d8162eb3e3d5b6008314cfdafd714c90632e0354.tar.gz |
punctuation in text
Diffstat (limited to 'src')
-rw-r--r-- | src/main/Analyzor.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/Analyzor.java b/src/main/Analyzor.java index e893529..4b30134 100644 --- a/src/main/Analyzor.java +++ b/src/main/Analyzor.java @@ -129,4 +129,12 @@ public class Analyzor { data.beforeFirst();
}
+
+ private String replacePunct(String text) {
+ text = text.replaceAll("https?://\\S*", "");
+ text = text.replaceAll("[!?):;\"']", " $0");
+ text = text.replaceAll("[.,-](\\s|$)", " $0");
+ text = text.replaceAll("\\s[(\"']", "$0 ");
+ return text;
+ }
}
|