龚金涛
龚金涛

Reputation: 21

How to learn semantic alignment in data-to-text NLG by unsupervised method?

I am a newbie in data-to-text NLG. I am researching the semantic alignment in data-to-text,the task definition is to label the segment of the reference text about the data tale with the key of the data table, as shown in the image below.

data-to-text

Now the difficulty is that there are no labeled data, so I have no idea to deal with it. So I want to know if there are any papers or methods on this issue. Thanks!

Upvotes: 0

Views: 124

Answers (1)

datamansahil
datamansahil

Reputation: 412

This is Linguistic Feature of Text which is called Part-of-speech tagging. You should start with spaCy, below is the code to understand it:

import spacy

nlp = spacy.load("en_core_web_sm")
doc = nlp("Apple is looking at buying U.K. startup for $1 billion")

for token in doc:
    print(token.text, token.lemma_, token.pos_, token.tag_, token.dep_,
            token.shape_, token.is_alpha, token.is_stop)

The output will be:

Apple Apple PROPN NNP nsubj Xxxxx True False
is be AUX VBZ aux xx True True
looking look VERB VBG ROOT xxxx True False
at at ADP IN prep xx True True
buying buy VERB VBG pcomp xxxx True False
U.K. U.K. PROPN NNP compound X.X. False False
startup startup NOUN NN dobj xxxx True False
for for ADP IN prep xxx True True
$ $ SYM $ quantmod $ False False
1 1 NUM CD compound d False False
billion billion NUM CD pobj xxxx True False

For a detailed understanding - https://spacy.io/usage/linguistic-features

Upvotes: 0

Related Questions