Replies: 3 comments 1 reply
-
This one that seems simpler... a sequence of elements of different type does not work to me. I'm not sure what I'm doing wrong with this rule, i get no matches...
The expected result would be:
|
Beta Was this translation helpful? Give feedback.
-
I am not sure what exactly your question is/are?
you can use a regex to match either the underlying text or the value of a feature, would that help?
Again, since you can match a regex against a feature you can do something like
This should be possible using
You can use any callable that takes the parameters: succ, context, location. So you could implement a class that has the method
|
Beta Was this translation helpful? Give feedback.
-
With the second example there are several issues:
For illustration I attach a notebook which illustrates this and should work with the very latest master version of gatenlp. BTW thanks for you questions and feedback: PAMPAC is a very complex piece of software and there is a huge range of possible situations, of which only a small set have been tested yet. So the more it gets used the more of any bugs in there we should be able to squash! |
Beta Was this translation helpful? Give feedback.
-
I want to check different parts of a text. I want to detect figure references. I could do a complex Regular expression but i want to do it using rules an annotate different parts of the text , but I don't know how to express the conditions over tokens
so I want to find expressions like and all the combinations...
Figures 2a, 3 and 5 or Figs. 15-17
I came to a solution like:
An has the following parameters:
type=None, features=None, features_eq=None, text=None, name=None, useoffset=True
but I don't know hot to use all the potential they have
so ...
Ann("Token", features=dict(is_digit=True)
I would like to indicate that the shape is like the regular expression "d+x"Ann("Token", features=dict(lemma=",")
i would like the lemma to be "," or "-" how can I do that?Text(re.compile("fig(ure)?s?\\.?",re.IGNORECASE))
i would like to say that this is the content of the token (the covered text?)So arrived to this one... but still not happy
a-b still missing... but now on the way.!
(i think you can use them as examples... )
And then when processing I would like to annotate the different numbers ( ref, ref1 ref2) and the full reference or maybe better,
be able to generate the list of references. Like [2a,3] and [15,16,17] for this part maybe i need 2 rules (one for "," and the other for "-" to do so i need i need to run a process (my own function instead of AddAnn, but wich parameter would such a function receive? )
Beta Was this translation helpful? Give feedback.
All reactions