Back to LanguageTool Homepage - Privacy - Imprint

Need help with writing suggestion

(Praneet Khandelwal) #1
        <token postag_regexp="yes" postag="VB.*"></token>
        <token />
        <token postag_regexp="no" postag="VB"></token>

I want to convert match no = 3 to have the same verb form as the verb in match no = 1. How to do this?

(Yakov) #2

You may use unification.

(Praneet Khandelwal) #3

I studied about unification. But I think it is used for combining tokens while matching the pattern. But the pattern I want to match is as above, I want to change the form of second verb to that of the first verb while giving suggestion. I am sorry I did not clearly frame my question clearly earlier.

(jaumeortola) #4

You want to synthesize a word using the lemma from one token and the postag from another token. Currently, this is not possible. It's a desirable feature (on my TODO list), but it's no easy to implement.

You can only make the suggestion if one of the two things (lemma from one token or postag from the other one) is fixed. You could write several rules (e.g. one rule per postag).