Back to LanguageTool Homepage - Privacy - Imprint

How-to populate MySQL database?


(Rob Stewart) #1

Hi!
New here, but I've been searching the forum for the past couple of days for an answer to a couple of questions...

I've...
1. Downloaded the community website as I wish to run the rule editor (version 2). "git clone http..."
2. Created an empty "ltcommunity" MySQL database and pointed the code to it. "DataSource.groovy"
3. Used "grails run-app" successfully to get the server running and the rule editor works!
4. I'm in the process of building a lucene index from a wikipedia XML file...
"java -cp languagetool-wikipedia.jar org.languagetool.dev.wikipedia.Main index-data enwiki-articles.xml folder en 0 1"

But I have a couple of questions...
1. How do I populate the MySQL database and with what? Alternatively - what is the purpose of requiring an empty database?
2. What do I do with this lucene stuff when it is finished? Do I just move it to some folder within the languagetool-community-website (ngram-data)? Or something else? If it's for the database - how do I put it there?

The above 2 items could be connected, but I can't seem to find documents, instructions or conversations that help me. It would be much appreciated if someone could point me in the right direction.

The goal for me is to make the rule editor as functional as possible and I cannot yet work out the 'Check Evaluation Results' section.

Thanks in advance!


(Daniel Naber) #2

Grails more or less requires a database because we used to use one in an older version of the website. I think it's not used nowadays (only for some internal stuff).

You can set it in Config.groovy, key fastSearchIndex. It's example data, not related to the ngram data.


(Rob Stewart) #3

Thanks for the quick response!

So, to be clear about the lucene data index folder...

...will this get me the rule editor 'Check Evaluation Results' section with example sentences (that seem to come from Wikipedia)? Or is that something else again?

Thanks again.


(Daniel Naber) #4

Yes, that should be it. Data on http://community.languagetool.org comes from Wikipedia and Tatoeba.


(Rob Stewart) #5

Thanks for all your help.
The Lucene index - once placed in a suitable folder and the 'fastSearchIndex' in 'Config.groovy' was changed to match, then everything worked great.

I also removed the reference to MySQL in 'BuildConfig.groovy' and deleted the entire contents of 'DataSource.groovy' and I no longer need to have a MySQL database.

OK - there may be issues with not having a MySQL database, but for the rule editor it seems, so far, to be fine.

Thanks again.