How to provide an example to show the library that I do not want any extraction. #238
Replies: 2 comments
-
|
The analogue of what I have been doing for that case is provide an example containing another vehicle like "motorbike" and in the same texrt incorporate the sentence where nothing should be extracted. For example, text = "I want to sell my motorbike to buy a red Honda Civic" You are implicitly telling the model to ignore Honda Civic. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, Thank you, I am not sure it is quite the same, yet your suggestion made me think of providing "synthetic" examples to try to teach the model what not to extract. The issue is more that the subject (the Honda Civic), in that particular sentence (context) is not a faithfull representative of my extraction class. While it can be in other sentences of the text. If I can think of a better non-domain-specific example, I'll share here. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a situation where the library is extracting terms that could sound like one of my classes, yet as they are named example,s I don't want them extracted.
For example, say I want to extract vehicle types but not makes and models.
I have tried this:
lx.data.ExampleData( text=textwrap.dedent("""The car is red."""), extractions=[ lx.data.Extraction( extraction_class="Vehicle", extraction_text="car", ), ]And the extraction works fine, if the text is something like "The Honda Civic is red", I don't want the model to either abstract "Honda Civic" into "Vehicle", and would be fine ignoring the sentence.
So I tried this syntax as to provide an example to the model.
lx.data.ExampleData( text=textwrap.dedent("""The Honda Civic is red."""), extractions=[ ]But I do not notice any difference in the extraction.
Any ideas?
Thank you,
Beta Was this translation helpful? Give feedback.
All reactions