Commit c170d470 authored by tammam.alsoleman's avatar tammam.alsoleman

edit the way to read the file

parent dd02f772
...@@ -19,7 +19,7 @@ public class TFIDFCalculator { ...@@ -19,7 +19,7 @@ public class TFIDFCalculator {
public static List<String> getWordsFromDocument(Path filePath) { public static List<String> getWordsFromDocument(Path filePath) {
try { try {
// قراءة الملف كنص UTF-8 // قراءة الملف كنص UTF-8
String content = Files.readString(filePath, StandardCharsets.UTF_8); String content = Files.readString(filePath, StandardCharsets.ISO_8859_1);
// أحرف صغيرة // أحرف صغيرة
content = content.toLowerCase(Locale.ROOT); content = content.toLowerCase(Locale.ROOT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment