public static void addCharSequence(LangProfile langProfile, CharSequence text) { //TODO replace with new code. // List<String> old = OldNgramExtractor.extractNGrams(text, null); // List<String> nuu = ngramExtractor.extractGrams(text); // // Set<String> oldSet = new HashSet<>(old); // Set<String> nuuSet = new HashSet<>(nuu); // // ArrayList<String> justNuu = new ArrayList<>(nuu); // justNuu.removeAll(old); // // ArrayList<String> justOld = new ArrayList<>(old); // justOld.removeAll(nuu); // // System.out.println(text); // for (String s : ngramExtractor.extractGrams(text)) { // langProfile.add(s); // } for (String s : OldNgramExtractor.extractNGrams(text, null)) { langProfile.add(s); } }
public static void addCharSequence(LangProfile langProfile, CharSequence text) { //TODO replace with new code. // List<String> old = OldNgramExtractor.extractNGrams(text, null); // List<String> nuu = ngramExtractor.extractGrams(text); // // Set<String> oldSet = new HashSet<>(old); // Set<String> nuuSet = new HashSet<>(nuu); // // ArrayList<String> justNuu = new ArrayList<>(nuu); // justNuu.removeAll(old); // // ArrayList<String> justOld = new ArrayList<>(old); // justOld.removeAll(nuu); // // System.out.println(text); // for (String s : ngramExtractor.extractGrams(text)) { // langProfile.add(s); // } for (String s : OldNgramExtractor.extractNGrams(text, null)) { langProfile.add(s); } }