Fix pitch display and sense deserializing
app/src/main/java/eu/lepiller/nani/dictionary/DictionaryFactory.java
269 | 269 | } | |
270 | 270 | ||
271 | 271 | public static URL getListUrl() throws MalformedURLException { | |
272 | - | return new URL("https://nani.lepiller.eu/dicos/list"); | |
272 | + | return new URL("https://nani.lepiller.eu/dicos2/list"); | |
273 | 273 | } | |
274 | 274 | ||
275 | 275 | public static File getListFile() { |
app/src/main/java/eu/lepiller/nani/dictionary/ResultDictionary.java
61 | 61 | String source_language = getString(file); | |
62 | 62 | sense_sources.add(new Result.Source(source_content, source_wasei, source_language)); | |
63 | 63 | } | |
64 | - | ArrayList<String> sense_infos = getStringList(file); | |
64 | + | ArrayList<String> sense_infos = getHuffmanStringList(file, meaningHuffman); | |
65 | 65 | ArrayList<String> sense_glosses = getHuffmanStringList(file, meaningHuffman); | |
66 | 66 | String sense_language = getString(file); | |
67 | 67 | senses.add(new Result.Sense(sense_references, sense_limits, sense_infos, sense_sources, |
app/src/main/java/eu/lepiller/nani/dictionary/WadokuPitchDictionary.java
72 | 72 | List<Result.Reading> readings = r.getReadings(); | |
73 | 73 | ||
74 | 74 | for(String k: kanjis) { | |
75 | - | Log.d(TAG, "Searching pitch for " + Arrays.toString(k.getBytes())); | |
76 | 75 | for(Result.Reading read: readings) { | |
77 | 76 | List<String> readingKanjis = read.getKanjis(); | |
78 | - | if(readingKanjis != null && !readingKanjis.contains(k)) { | |
77 | + | if(readingKanjis != null && readingKanjis.size() > 0 && !readingKanjis.contains(k)) { | |
79 | 78 | // this is not a reading for the current kanji, so continue to the next | |
80 | 79 | // reading | |
81 | 80 | continue; | |
82 | 81 | } | |
83 | 82 | List<String> innerReadings = read.getReadings(); | |
84 | 83 | for(String reading: innerReadings) { | |
84 | + | Log.d(TAG, "Searching pitch for " + k + reading); | |
85 | 85 | String pitch = findPitch(k, reading, file); | |
86 | 86 | if(pitch != null) { | |
87 | 87 | Log.d(TAG, "Found " + pitch); |