Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exclusion contexts in patterns #50

Open
unhammer opened this issue Jun 24, 2022 · 4 comments
Open

exclusion contexts in patterns #50

unhammer opened this issue Jun 24, 2022 · 4 comments

Comments

@unhammer
Copy link
Member

unhammer commented Jun 24, 2022

I want lone determiners/adjectives to be antecedents. In Norwegian, we get these ellipses like the<mf><sg> was sold or red<pl> was drawn – both of those are good antecedents, but we never want the determiner in the car or adjective in red paint to be an antecedent. So it'd be nice to be able to say

      <pattern>
        <pattern-item n="det"/>
        <negate><pattern-item n="noun_or_adj"/></negate>
      </pattern>

and have that match determiners not followed by noun or adj.


Alternatively, would it be easier to add a score per pattern-item? Then I could make a negative rule for modifying determiner/adj's of noun phrases, e.g.

    <markable n="DETMOD"> <!-- score modifying determinatives lower (we only want *lone* determinatives to be antecedents) -->
      <pattern>
        <pattern-item n="det" score="-1"/>
        <pattern-item n="adj" score="-1"/>
        <pattern-item n="nom" />
      </pattern>
</markable>

or something like that.

@khannatanmai
Copy link
Member

Hey,
Both of these are good ideas and prolly should be implemented. The part about individual scores to elements was something I was going to implement, just never found a use case for it.

As for the first part, I coded this thing more than two years ago so I'm not very sure, but I was just looking in the documentation:
def-parameters has this element called "exclude-tags" in addition to "has-tags". Now there's no example of this in the documentation but if we have the "exclude-tags" element in def-cats as well, you could do something like:

<def-cat n="det">
	<cat-item has-tags="det"/>
	<cat-item has-tags="det pos"/>
</def-cat>

<def-cat n="not_noun_or_adj">
        <cat-item exclude-tags="n"/>
	<cat-item exclude-tags="adj"/>
</def-cat>

and then in markable:

<pattern>
        <pattern-item n="det"/>
        <pattern-item n="not_noun_or_adj"/>
</pattern>

I do recognise that this would be more tedious than just being able to negate pattern-items, plus I haven't even tried this yet. So can look into it.

@unhammer
Copy link
Member Author

Ah, yeah that might help :-) didn't know you could have just exclude without has-tags :)

@khannatanmai
Copy link
Member

khannatanmai commented Jun 27, 2022 via email

@unhammer
Copy link
Member Author

unhammer commented Jun 27, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants