Grand Sorcerer
Posts: 5,739
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Originally Posted by KevinH
Okay, I looked closer at newer versions of Hunspell than what comes in Sigil and they have added a new C wrapper call to the hunspell.h interface called Hunspell_add_dic.
|
Thanks for looking into this! However, AFAIK, LanguageTool is a self-contained .jar file that doesn't have any dependencies other than Java. I've just downloaded the latest stable version (6.0) and it works fine with the plugin.
I tested it with the following well-known nonsense English sentence:
Code:
<body>
<p>I Can Has Cheezburger?</p>
</body>
and got two error messages:
LanguageTool also worked fine with random English and Italian books.
However, when I checked content0004.xhtml in Leonatus's latest German MR upload ( Fogazzaro, Antonio: Kleine moderne Welt [German] V.1 29.01.2023) I got the following error message:
Spoiler:
Code:
Working on content0004.xhtml...
LanguageTool Java error.
Expected text language: German (Germany) (no spell checking active)
Working on C:\Users\user\AppData\Local\Temp\tmpnm_js3br\content0004.xhtml...
Exception in thread "main" java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: Could not check sentence (language: German (Germany)): <sentcontent>»Ah, ah«, brummte er, als er der Präfekt angekündigt wurde, »ah, jetzt sollten wir gerade heraus reden! </sentcontent>
at org.languagetool.MultiThreadedJLanguageTool.performCheck(MultiThreadedJLanguageTool.java:217)
at org.languagetool.JLanguageTool.checkInternal(JLanguageTool.java:991)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:910)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:895)
at org.languagetool.commandline.CommandLineTools.checkText(CommandLineTools.java:112)
at org.languagetool.commandline.CommandLineTools.checkText(CommandLineTools.java:88)
at org.languagetool.commandline.Main.runOnFile(Main.java:186)
at org.languagetool.commandline.Main.main(Main.java:454)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: Could not check sentence (language: German (Germany)): <sentcontent>»Ah, ah«, brummte er, als er der Präfekt angekündigt wurde, »ah, jetzt sollten wir gerade heraus reden! </sentcontent>
at java.base/java.util.concurrent.ForkJoinTask.reportExecutionException(ForkJoinTask.java:605)
at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:981)
at org.languagetool.MultiThreadedJLanguageTool.performCheck(MultiThreadedJLanguageTool.java:214)
... 7 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Could not check sentence (language: German (Germany)): <sentcontent>»Ah, ah«, brummte er, als er der Präfekt angekündigt wurde, »ah, jetzt sollten wir gerade heraus reden! </sentcontent>
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:562)
at java.base/java.util.concurrent.ForkJoinTask.reportExecutionException(ForkJoinTask.java:604)
... 9 more
Caused by: java.lang.RuntimeException: Could not check sentence (language: German (Germany)): <sentcontent>»Ah, ah«, brummte er, als er der Präfekt angekündigt wurde, »ah, jetzt sollten wir gerade heraus reden! </sentcontent>
at org.languagetool.JLanguageTool$TextCheckCallable.getOtherRuleMatches(JLanguageTool.java:1993)
at org.languagetool.JLanguageTool$TextCheckCallable.call(JLanguageTool.java:1862)
at org.languagetool.MultiThreadedJLanguageTool.lambda$null$1(MultiThreadedJLanguageTool.java:200)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.RuntimeException: Error analyzing sentence: '<S> »[»/null,O]Ah[ah/INJ,O],[,/PKT,O] ah[ah/INJ,O]«[«/null,O],[,/PKT,O] brummte[brummen/VER:3:SIN:KJ2:SFT,brummen/VER:3:SIN:PRT:SFT,O] er[ich/PRO:PER:NOM:SIN:MAS,O],[,/PKT,O] als[als/KON:NEB,als/KON:UNT,als/KON:VGL,als/PRP:NOM+DAT+AKK,PP] er[ich/PRO:PER:NOM:SIN:MAS,PP] der[der/ART:DEF:NOM:SIN:MAS,der/PRO:DEM:NOM:SIN:MAS,der/PRO:PER:NOM:SIN:MAS,B-NP|NPS|PP] Präfekt[Präfekt/SUB:NOM:SIN:MAS,I-NP|NPS|PP] angekündigt[angekündigt/PA2:PRD:GRU:VER,ankündigen/VER:PA2:SFT,O] wurde[werden/VER:1:SIN:PRT:NON,werden/VER:3:SIN:PRT:NON,werden/VER:AUX:1:SIN:PRT,werden/VER:AUX:3:SIN:PRT,O],[,/PKT,O] »[»/null,O]ah[ah/INJ,O],[,/PKT,O] jetzt[jetzt/ADV:TMP,O] sollten[sollen/VER:MOD:1:PLU:KJ2,sollen/VER:MOD:1:PLU:PRT,O] wir[ich/PRO:PER:NOM:PLU:ALG,O] gerade[gerade/ADJ:AKK:PLU:FEM:GRU:SOL,gerade/ADJ:AKK:PLU:MAS:GRU:SOL,gerade/ADJ:AKK:PLU:NEU:GRU:SOL,gerade/ADJ:AKK:SIN:FEM:GRU:DEF,gerade/ADJ:AKK:SIN:FEM:GRU:IND,gerade/ADJ:AKK:SIN:FEM:GRU:SOL,gerade/ADJ:AKK:SIN:NEU:GRU:DEF,gerade/ADJ:NOM:PLU:FEM:GRU:SOL,gerade/ADJ:NOM:PLU:MAS:GRU:SOL,gerade/ADJ:NOM:PLU:NEU:GRU:SOL,gerade/ADJ:NOM:SIN:FEM:GRU:DEF,gerade/ADJ:NOM:SIN:FEM:GRU:IND,gerade/ADJ:NOM:SIN:FEM:GRU:SOL,gerade/ADJ:NOM:SIN:MAS:GRU:DEF,gerade/ADJ:NOM:SIN:NEU:GRU:DEF,gerade/ADJ:PRD:GRU,gerade/ADV,gerade/ZUS,O] heraus[heraus/ADV:LOK,heraus/ZUS,heraus/ADV:LOK,heraus/ZUS,O] reden[reden/VER:1:PLU:KJ1:SFT,reden/VER:1:PLU:PRÄ:SFT,reden/VER:3:PLU:KJ1:SFT,reden/VER:3:PLU:PRÄ:SFT,reden/VER:INF:SFT,O]![</S>!/PKT,O] ' with rule ZUSAMMENSCHREIBUNG_HER[1]
at org.languagetool.rules.patterns.PatternRuleMatcher.match(PatternRuleMatcher.java:98)
at org.languagetool.rules.patterns.PatternRule.match(PatternRule.java:218)
at org.languagetool.JLanguageTool.checkAnalyzedSentence(JLanguageTool.java:1370)
at org.languagetool.JLanguageTool.access$1500(JLanguageTool.java:74)
at org.languagetool.JLanguageTool$TextCheckCallable.getOtherRuleMatches(JLanguageTool.java:1950)
... 8 more
Caused by: java.lang.RuntimeException: Could not create hunspell instance. Please note that LanguageTool supports only 64-bit platforms (Linux, Windows, Mac) and that it requires a 64-bit JVM (Java).
at org.languagetool.rules.spelling.hunspell.DumontsHunspellDictionary.<init>(DumontsHunspellDictionary.java:35)
at org.languagetool.rules.spelling.hunspell.Hunspell.getDictionary(Hunspell.java:46)
at org.languagetool.rules.spelling.hunspell.HunspellRule.init(HunspellRule.java:584)
at org.languagetool.rules.de.GermanSpellerRule.init(GermanSpellerRule.java:1557)
at org.languagetool.rules.spelling.hunspell.HunspellRule.ensureInitialized(HunspellRule.java:558)
at org.languagetool.rules.spelling.hunspell.HunspellRule.isMisspelled(HunspellRule.java:490)
at org.languagetool.rules.de.GermanSpellerRule.isMisspelled(GermanSpellerRule.java:1917)
at org.languagetool.rules.de.RemoveUnknownCompoundsFilter.acceptRuleMatch(RemoveUnknownCompoundsFilter.java:36)
at org.languagetool.rules.patterns.RuleFilterEvaluator.runFilter(RuleFilterEvaluator.java:43)
at org.languagetool.rules.patterns.PatternRuleMatcher.createRuleMatch(PatternRuleMatcher.java:177)
at org.languagetool.rules.patterns.PatternRuleMatcher.lambda$match$1(PatternRuleMatcher.java:81)
at org.languagetool.rules.patterns.AbstractPatternRulePerformer.matchFrom(AbstractPatternRulePerformer.java:161)
at org.languagetool.rules.patterns.AbstractPatternRulePerformer.doMatch(AbstractPatternRulePerformer.java:75)
at org.languagetool.rules.patterns.PatternRuleMatcher.match(PatternRuleMatcher.java:80)
... 12 more
Caused by: java.lang.UnsatisfiedLinkError: Error looking up function 'Hunspell_add_dic': The specified procedure could not be found.
at com.sun.jna.Function.<init>(Function.java:252)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:604)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:580)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:566)
at com.sun.jna.Native.register(Native.java:1904)
at dumonts.hunspell.bindings.HunspellLibrary.<clinit>(HunspellLibrary.java:18)
at dumonts.hunspell.Hunspell.<init>(Hunspell.java:21)
at org.languagetool.rules.spelling.hunspell.DumontsHunspellDictionary.<init>(DumontsHunspellDictionary.java:33)
... 25 more
@Leonatus
Unfortunately, there's nothing I can do about this. You'll need to downgrade LT 6.0 to LT 5.9 until this bug has been fixed.
You might want to contact the German lead developer send him content0004.xhtml and the above error message and ask him to fix this bug.
http://www.danielnaber.de/
Last edited by Doitsu; 01-30-2023 at 01:11 PM.
|