Re: chunks in exceptions

2014-08-18 Thread Andriy Rysin
Ahh, I didn't realize I had to add angle brackets as well, the
postag="" works.

Thanks a lot!
Andriy

2014-08-18 2:50 GMT-04:00 Marcin Miłkowski :
> W dniu 2014-08-18 04:11, Andriy Rysin pisze:
>> On 08/16/2014 06:07 PM, Daniel Naber wrote:
>>> On 2014-08-11 01:47, Andriy Rysin wrote:
>>>
 I was writing a rule were I had to catch a phrase with last word being
 noun, but only if that noun is not part of adverb chunk (with another
 word following). The best way to do that seems to use adverb chunk in
 exception but looks like this is not supported.
>>> Sorry for the late reply. If by chunks you mean phrases (and not chunks
>>> in the sense that the Language class has getChunker() implemented): the
>>> reason that they are not supported is probably that adding support might
>>> be difficult. The matching algorithm is already complicated.
>>>
>>> Note that you can use  to specify patterns that prevent
>>> matching. These match on the whole sentence, though, not at a specific
>>> token.
>>>
>> No, I actually mean chunker (if I understand the concept correctly), I
>> have some adverb chunks defined in multiwords and it would be nice to be
>> abel to use them in exceptions and not just in tokens.
>> E.g. «показати тією мірою» have  chunk marker on тією and  on
>> мірою (besides their POS tags) so I would like to be able to use those.
>> And I would like to stick to localized scope so using antipattern is not
>> the best approach here.
>
> To have chunks, you'd have to add a separate interface for the chunker.
> The  tags you mention are *not* chunker tags, these are simple POS
> tags and you can use them in exceptions as POS tags.
>
> Hope that helps.
>
> Best,
> Marcin
>
> --
> ___
> Languagetool-devel mailing list
> Languagetool-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/languagetool-devel

--
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: chunks in exceptions

2014-08-17 Thread Marcin Miłkowski
W dniu 2014-08-18 04:11, Andriy Rysin pisze:
> On 08/16/2014 06:07 PM, Daniel Naber wrote:
>> On 2014-08-11 01:47, Andriy Rysin wrote:
>>
>>> I was writing a rule were I had to catch a phrase with last word being
>>> noun, but only if that noun is not part of adverb chunk (with another
>>> word following). The best way to do that seems to use adverb chunk in
>>> exception but looks like this is not supported.
>> Sorry for the late reply. If by chunks you mean phrases (and not chunks
>> in the sense that the Language class has getChunker() implemented): the
>> reason that they are not supported is probably that adding support might
>> be difficult. The matching algorithm is already complicated.
>>
>> Note that you can use  to specify patterns that prevent
>> matching. These match on the whole sentence, though, not at a specific
>> token.
>>
> No, I actually mean chunker (if I understand the concept correctly), I
> have some adverb chunks defined in multiwords and it would be nice to be
> abel to use them in exceptions and not just in tokens.
> E.g. «показати тією мірою» have  chunk marker on тією and  on
> мірою (besides their POS tags) so I would like to be able to use those.
> And I would like to stick to localized scope so using antipattern is not
> the best approach here.

To have chunks, you'd have to add a separate interface for the chunker. 
The  tags you mention are *not* chunker tags, these are simple POS 
tags and you can use them in exceptions as POS tags.

Hope that helps.

Best,
Marcin

--
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: chunks in exceptions

2014-08-17 Thread Andriy Rysin
On 08/16/2014 06:07 PM, Daniel Naber wrote:
> On 2014-08-11 01:47, Andriy Rysin wrote:
>
>> I was writing a rule were I had to catch a phrase with last word being
>> noun, but only if that noun is not part of adverb chunk (with another
>> word following). The best way to do that seems to use adverb chunk in
>> exception but looks like this is not supported.
> Sorry for the late reply. If by chunks you mean phrases (and not chunks 
> in the sense that the Language class has getChunker() implemented): the 
> reason that they are not supported is probably that adding support might 
> be difficult. The matching algorithm is already complicated.
>
> Note that you can use  to specify patterns that prevent 
> matching. These match on the whole sentence, though, not at a specific 
> token.
>
No, I actually mean chunker (if I understand the concept correctly), I
have some adverb chunks defined in multiwords and it would be nice to be
abel to use them in exceptions and not just in tokens.
E.g. «показати тією мірою» have  chunk marker on тією and  on
мірою (besides their POS tags) so I would like to be able to use those.
And I would like to stick to localized scope so using antipattern is not
the best approach here.

Thanks
Andriy

--
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: chunks in exceptions

2014-08-16 Thread Daniel Naber
On 2014-08-11 01:47, Andriy Rysin wrote:

> I was writing a rule were I had to catch a phrase with last word being
> noun, but only if that noun is not part of adverb chunk (with another
> word following). The best way to do that seems to use adverb chunk in
> exception but looks like this is not supported.

Sorry for the late reply. If by chunks you mean phrases (and not chunks 
in the sense that the Language class has getChunker() implemented): the 
reason that they are not supported is probably that adding support might 
be difficult. The matching algorithm is already complicated.

Note that you can use  to specify patterns that prevent 
matching. These match on the whole sentence, though, not at a specific 
token.

Regards
  Daniel


--
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


chunks in exceptions

2014-08-10 Thread Andriy Rysin
Hi all

I was writing a rule were I had to catch a phrase with last word being
noun, but only if that noun is not part of adverb chunk (with another
word following). The best way to do that seems to use adverb chunk in
exception but looks like this is not supported. So after multiple
experiments and reading our wiki pages I wrote a rule like this and it
works but it does generate a warning:

Running pattern rule tests for Ukrainian... The Ukrainian rule:
PASSIVE_PREDICATE:1 (exception in token [4]), token [4], contains
"тією мірою" that contains token separators, so can't possibly be
matched.

Current solution looks ugly and although it works I'd like to make it
right. So the question is is there a reason why chunks are not
supported in exceptions? And if there's a reason we should not support
chunks in exceptions what's the best way to write a rule below
(without splitting it to two or complicating it even more)?

Thanks
Andriy

   





  
  тією мірою




--
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel