Back to LanguageTool Homepage - Privacy - Imprint

Adding Scottish Gaelic


(Catrìona Anderson) #1

Hi, myself and another person (Akerbeltz) are interested in becoming maintainers for a new language, Scottish Gaelic. There is already spellchecking support for Gaelic on LibreOffice but we want to add a syntax checker. We wanted to check that this project is open to our language before we get started. Thanks!


(Daniel Naber) #2

Hi Catrìona,

thanks for your interest in LanguageTool. We're generally open to new languages, but we require a long-term commitment to maintain that language. The reason is that too many languages got added in the past that are now unmaintained (see https://languagetool.org/languages/). To help ensure that, I suggest that new languages are added in a fork at github. If the new language is maintained for at least 3 months, we can add it to LT as "experimental" first.

Please let us know if you have questions.

Regards
Daniel


(Catrìona Anderson) #3

Thank you! I will start working on the checker in a fork. Since there are two quite different ways of doing the case system, we will have multiple sub-folders rather like you have en-br, en-us and en-nz. I currently am keeping the fork at https://github.com/katyasyc/languagetool although it might move later.


(Catrìona Anderson) #4

@dnaber I set up the project according to the instructions but unfortunately the maven has a compile time error. I know it is missing some dependencies but I am not sure how to fix it. I am a CS major but have no experience with maven. All the changes are checked into my fork (https://github.com/katyasyc/languagetool). Here's the error:

Do you know what might be going on? Thanks so much!


(Daniel Naber) #5

Trying to reproduce this, I get different errors: are you sure you have checked in all files? I'm missing ScottishGaelicWordTokenizer.java, ScottishGaelicSynthesizer.java, CastWordsRule.java and others.


(Catrìona Anderson) #6

Thanks for your help. To start out, I was just trying to set up a minimal setup as described in (http://wiki.languagetool.org/adding-a-new-language). As checked in the dependencies in ScottishGaelic.java weren't giving me any errors. I commented out all of the ones that weren't being used and committed but that didn't change the error message.


(Daniel Naber) #7

With the attached file I can compile your code. I later get an error in the tests ("No language file available named gd at languages/gd"), but you should get this far, too. What command exactly have you called? What's your maven version (mvn -v)? Can you compile the original sources of LT without any changes?

ScottishGaelic.java (3.9 KB)


(Catrìona Anderson) #8

Part of the problem may have been the command I was running; maven instructed me to use (mvn compile -rf :language-gd) to resume the compiling process after changing the files that were causing some of the errors. When I restarted the process with mvn clean package, I got a different error (stack trace below.) The current version of languagetool on github isn't giving me any problems. I did have to comment out a few more lines in ScottishGaelic.java (committed the changes.)
I am running on
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00) Mac OSX.

Thanks so much for your help!

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project language-gd: Compilation failure
[ERROR] /Users/katya/languagetool/languagetool-language-modules/gd/src/main/java/org/languagetool/language/ScottishGaelic.java:[40,8] org.languagetool.language.ScottishGaelic is not abstract and does not override abstract method getRelevantRules(java.util.ResourceBundle) in org.languagetool.Language
[ERROR]
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project language-gd: Compilation failure
/Users/katya/languagetool/languagetool-language-modules/gd/src/main/java/org/languagetool/language/ScottishGaelic.java:[40,8] org.languagetool.language.ScottishGaelic is not abstract and does not override abstract method getRelevantRules(java.util.ResourceBundle) in org.languagetool.Language

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
/Users/katya/languagetool/languagetool-language-modules/gd/src/main/java/org/languagetool/language/ScottishGaelic.java:[40,8] org.languagetool.language.ScottishGaelic is not abstract and does not override abstract method getRelevantRules(java.util.ResourceBundle) in org.languagetool.Language

at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1029)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:137)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more

(Daniel Naber) #9

This is the issue - getRelevantRules(java.util.ResourceBundle) must exist in ScottishGaelic.java and must not be commented out.