Hi Andriy,

For the grammar file, I did what you did.

Line 3 in grammar-en-asdste100-issue3-2013-09-10 (which must be renamed to
grammar.xml) is:
 <!ENTITY ProjectTermsGrammarRules SYSTEM
"org/languagetool/rules/en/grammar-projectterms.xml">

Line 32907 is:
&ProjectTermsGrammarRules;

> As those included files will be in a jar as I understand it the classpath:
is the only way to do it but so far I can't make java code to perform the
inclusion.

OK, I misunderstood your initial question. I do not know how to include a
grammar file in a JAR file. Sorry.

I use only the stand-alone version of LT. The grammar files and the
disambiguation files are not in JAR files. I guess that for the
LibreOffice/OpenOffice version of LT, the grammar file is in a JAR file. Is
my guess correct?

Regards,

Mike

-----Original Message-----
From: Andriy Rysin [mailto:[email protected]] 
Sent: 17 October 2013 14:46
To: development discussion for LanguageTool
Subject: Re: Is it possible to use modular XML files?

Hi Mike

I looked at your files and I could not find how you actually include
the grammar-projectterms.xml from the main grammar.xml (I saw the
comments mentioning &ProjectTermsGrammarRules; but haven't see this
entity being defined or used).

In my grammar.xml I just added this line after the header comment

<!DOCTYPE doc [
<!ENTITY grammar_punct SYSTEM "org/languagetool/rules/uk/grammar_punct.xml">
]>

and then inside rules added

    &grammar_punct;

this seems to be correct xml code as I ran "xmllist --noent
grammar.xml"  and it did expand my grammar.xml properly with included
file. But I can't make LT to do the same. I tried just filename,
filename with path, file://, classpath:// - nothing works. As those
included files will be in a jar as I understand it the classpath: is
the only way to do it but so far I can't make java code to perform the
inclusion.

Thanks,
Andriy


2013/10/17 Mike Unwalla <[email protected]>:
> Andriy,
>
> For an example, refer to these 2 files on
> www.simplified-english.co.uk/installation.html:
>         grammar-en-asdste100-issue3-2013-09-10.zip
>         grammar-projectterms.xml
>
> If you cannot split your grammar file successfully after you have looked
at
> these 2 files, send me your Ukrainian grammar file(s), and I will try to
> find the problem.
>
> Regards,
>
> Mike Unwalla
> Contact: www.techscribe.co.uk/techw/contact.htm
>
>
>
> -----Original Message-----
> From: Andriy Rysin [mailto:[email protected]]
> Sent: 16 October 2013 22:01
> To: development discussion for LanguageTool
> Subject: Re: Is it possible to use modular XML files?
>
> So was anybody able to successfully use this? I don't this this in
> language-modules anywhere. I would *really* like to split grammar.xml
> for Ukrainian but I spent some time today and I could not make it
> work.
> I tried just a filename, file://, classpath:// then I googled a bit
> and tried to define my own entity resolver, also defined my our url
> handler for classpath: etc but hothing helped, most of the tries throw
> an exception XMLEntityManager.setupCurrentEntity() :(
> I must say I haven't tried absolute file paths as they are useless insdie
> jars
>
> Thanks
> Andriy
>
> 2013/7/19 Mike Unwalla <[email protected]>:
>> Hi All,
>>
>> The method that uses an external (parsed) general entity works fine for
> me.
> <snip>
>
>
>
----------------------------------------------------------------------------
--
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
from
> the latest Intel processors and coprocessors. See abstracts and register >
>
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
> _______________________________________________
> Languagetool-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/languagetool-devel

----------------------------------------------------------------------------
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Languagetool-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Languagetool-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to