How to capture the detail of an attribute in a sentence?

The problem is best explained using an example, so please consider the sentence below:

Made of airy cotton with a touch of stretch, the Pinafore Dress features a modern square neckline.

Here, cotton (FABRIC) and square neckline (NECKLINE) are two important attributes in the sentence. What I need to do is to capture the word airy which is a detail of the fabric. FABRIC and NECKLINE can be successfully captured using NER, but NER is not working well when it comes to capturing the detail terms like airy.

Can someone point out how I could solve this?

Topic grammar-inference nlp

Category Data Science


You can try using dependency parsing for that, e.g., as implemented in Spacy or any other NLP toolkit.

The details should be adjective modifiers (dependency label amod) of what you call attribute that you detected using a NER-like approach.

enter image description here

Alternatively, they can form compound nouns as "airy cotton" in your example. In this case, it is a word that depends on the entity with the dependency label compound. But I guess this will be rarely the case because such compounds will be more often recognized as one entity.

enter image description here

Spacy has an online demo for dependency parsing.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.