diff --git a/source/org/thdl/tib/scanner/LocalTibetanScanner.java b/source/org/thdl/tib/scanner/LocalTibetanScanner.java index bcdeefd..c5b86f5 100644 --- a/source/org/thdl/tib/scanner/LocalTibetanScanner.java +++ b/source/org/thdl/tib/scanner/LocalTibetanScanner.java @@ -165,7 +165,8 @@ public class LocalTibetanScanner extends TibetanScanner if (lastCompSil!=null) { - w = new Word(lastCompWord, lastCompSil.getDefs()); + if (lastCompWord.equals(wordActual)) w = new Word(lastCompWord, lastCompSil.getDefs()); + else w = new Word(lastCompWord, wordActual, lastCompSil.getDefs()); wordList.addLast(w); this.resetAll(); @@ -202,7 +203,8 @@ public class LocalTibetanScanner extends TibetanScanner while (lastCompSil!=null) { - w = new Word(lastCompWord, lastCompSil.getDefs()); + if (lastCompWord.equals(wordActual)) w = new Word(lastCompWord, lastCompSil.getDefs()); + else w = new Word(lastCompWord, wordActual, lastCompSil.getDefs()); wordList.addLast(w); this.resetAll(); diff --git a/source/org/thdl/tib/scanner/OnLineScannerFilter.java b/source/org/thdl/tib/scanner/OnLineScannerFilter.java index ee6ba94..7ea4e63 100644 --- a/source/org/thdl/tib/scanner/OnLineScannerFilter.java +++ b/source/org/thdl/tib/scanner/OnLineScannerFilter.java @@ -351,35 +351,35 @@ public class OnLineScannerFilter extends HttpServlet for (i=0; i < words.length; i++) { - if (words[i] instanceof Word) - { - word = new SwingWord((Word)words[i]); - if (word.getDefs().getDictionarySource()!=null) - pw.print(word.getLink()); - else pw.print(word.getWylie() + " "); - } - else - { - if (words[i] instanceof PunctuationMark) - { - pm = words[i].toString().charAt(0); - switch (pm) - { - case '\n': - pw.println("
"); - pw.print(""); - break; - case '<': - pw.print("< "); - break; - case '>': - pw.print("> "); - break; - default: - pw.print(pm + " "); - } - } - } + if (words[i] instanceof Word) + { + word = new SwingWord((Word)words[i]); + // if (word.getDefs().getDictionarySource()!=null) + pw.print(word.getLink()); + // else pw.print(word.getWylie() + " "); + } + else + { + if (words[i] instanceof PunctuationMark) + { + pm = words[i].toString().charAt(0); + switch (pm) + { + case '\n': + pw.println("
"); + pw.print(""); + break; + case '<': + pw.print("< "); + break; + case '>': + pw.print("> "); + break; + default: + pw.print(pm + " "); + } + } + } } pw.println("
"); } @@ -407,34 +407,24 @@ public class OnLineScannerFilter extends HttpServlet word = new SwingWord(words[j]); defs = word.getDefs(); ds = defs.getDictionarySource(); - if (ds==null || ds.isEmpty()) continue; pw.println("