Page MenuHomePhabricator
Paste P8611

(An Untitled Masterwork)
ActivePublic

Authored by EBernhardson on Jun 13 2019, 9:38 PM.
Tags
None
Referenced Files
F29522452: raw.txt
Jun 13 2019, 9:38 PM
Subscribers
None
public Map<String, Collection<String>> confusions() throws IOException {
Map<String, Collection<String>> res = new HashMap<>();
for (CSVRecord record : parse(M2Resources.CONFUSIONS)) {
String from = record.get("charFrom");
String to = record.get("charTo");
res.computeIfAbsent(from, x -> new ArrayList<>()).add(to);
}
return res;
}