Dňa 23.06.2013 21:23, Marcin Miłkowski wrote / napísal(a):

Thank you. Marcin! It works.
Milos
> W dniu 2013-06-23 12:01, Milos Sramek pisze:
>> Hi,
>>
>> I am new in this list. I would like to find some linguists to create a
>> meaningful set of grammar rules for Slovak (so that we can say that LT
>> is supported in Slovak), but first I have to learn how to create the LT
>> rules by myself.
>>
>> Since Slovak is rich in forms, I think that the following problem can
>> occur quite often:
>>
>> It is a common error in Slovak that the pronoun 'koho' (meaning 'whom')
>> is incorrectly used instead of 'čí' ('whose'). 'koho' is in this case
>> used without inflection and should be replaced by a proper inflected
>> form of 'čí', which depends on a matching noun.
>>
>> The rule to identify the incorrect text is:
>>     <token>koho</token>
>>     <token postag="S...." postag_regexp="yes"></token>
>>
>> where the POS tag means: a noun (S) in any gender, number and case. (the
>> last 3 dots).
>> (it looks like the POS tags are language specific, aren't they?)
> They are.
>
>> In the suggestion tag it is thus necessary to apply the noun parameters
>> specified by the last three dots to the pronoun 'čí', so that it matches
>> the noun. In the tutorial http://www.languagetool.org/development/ there
>> is an example, how to do that between two verbs:
>> <match no="1" postag="verb:.*perf">kierować</match>
>>
>> I tried:
>> <suggestion> <match no="2" postag="PA...">čí</match> \2</suggestion>.
>> which suggests all possible forms of 'čí', and
>> <suggestion> <match no="2" postag="S....">čí</match> \2</suggestion>.
>> which does not suggest anything.
>>
>> Is there a way how to do that for the pair noun,pronoun?
> Yes, but you need to use a regular expression to change the POS tag of
> the matched word (use replace patterns).
>
> Here's an example from the Polish file:
>
> <message>Ten wyraz powinien być w mianowniku: <suggestion>
>
> <match no="2" postag="(adj|ppas|pact):sg:inst.*(:pos)"
> postag_regexp="yes" postag_replace="$1:sg:.*nom.*:n1\.n2.*$2"></match>
>
> </suggestion> (domyślnym podmiotem jest „to”).
>
> </message>
>
> Now, as you can see the postag is specified with a regular expression,
> and you will need to use "S(.*)" or something like this. Then, simply
> use "PA$1" in postag_replace. Of course, I am not entirely sure if all
> attributes of nouns are fine for pronouns in Slovak, but if they are, it
> should work just like this. If not, you need to add more structure to
> your replacement patterns.
>
> Best,
> Marcin
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Languagetool-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/languagetool-devel


-- 
Milos Sramek, [email protected]


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Languagetool-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to