Is there a way to tell spaCy that certain words are related to a certain number? #12876
Replies: 2 comments 1 reply
-
SpaCy comes with a dependency parser that you can use for this kind of thing. |
Beta Was this translation helpful? Give feedback.
-
@Alyarin After looking at dependency parser, I realised that I can use the patterns entity ruler
This gives a very awkward output of
Seems that I was unable to get the feed rate or the parameter "outlet temperature" I'm only trying things out to see if I can separate them like this. May I ask for your opinions on how to use REGEX to extract words like "ml/min","L/hr" or anything with special characters. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to ask if there's a way to tell spaCy that certain words in a sentence are related to certain number?
sentence = "The feed rate, aspirator rate, inlet and outlet temperature and air flow rate were approximately 3l/hr, 100%, 120C, 90C, and 357l/hr, respectively."
From above, we know that feed rate is 3l/hr, aspirator rate is 100%, inlet temperature is 120C, outlet temperature is 90C, and finally, air flow rate is 357l/hr
What I'm trying to do is to extract information from scientific articles with regards to certain parameters that they use. I've learnt how to tag certain words and put a custom label on them. But I'm unsure how to link words in a sentence with numbers, especially with a sentence as complicated as above.
The code below shows what I've done to label certain entities in a sentence. I have a list of materials one file and a list of equipment in another file. Using these list, I extract information from a paragraph and then I can view it using pandas.
sentence = "The feed rate, aspirator rate, inlet and outlet temperature and air flow rate were approximately 3l/hr, 100%, 120C, 90C, and 357l/hr, respectively."
From above, we know that feed rate is 3l/hr, aspirator rate is 100%, inlet temperature is 120C, outlet temperature is 90C, and finally, air flow rate is 357l/hr
The code below shows what I've done to label certain entities in a sentence. I have a list of materials one file and a list of equipment in another file. Using these list, I extract information from a paragraph and then I can view it using pandas.
I would like to do the same for parameters. Where I can extract the parameter name, and value that comes with it. Is it possible?
Beta Was this translation helpful? Give feedback.
All reactions