(This article is refined by my previous blog website)
Language production processes can be an interplay between sound, syntax and semantics. In these production processes, semantic is the most important one. In a semantic condition, a judgment ultimately rests on the comparison between single word meanings, the syntactic structure of the sentences within each pair being the same
Sound System: Knowing a language means knowing what sounds are in that language and what sounds are not. It means also knowing which sounds may start a word, end a word, and follow each other.
Semantic : the meaning of words or sentences. The meaning of sentences requires understanding both the meaning of individual words and the syntactic context in which the words are embedded. Words can denote a literal or core meaning and connote a halo of associative meanings.
Syntax: sentence / non-sentence form. Language not only allows us to produce and understand an infinite number of well-formed sentences. It also permits to distinguish formed of right or not.
For example,
Sentence 1: "Achilles defeated the enemy."
Sentence 2: "The enemy is defeated by Achilles."
These two sentences have different sentence forms, but they share the same meaning — defeated(Achilles, enemy).
In Natural Language Processing (NLP), the traditional language representation can be divided into two ways- Dependency & Constraint. Both dependency and constraint are verb centered and every verb has it own arguments. Through the relationship between arguments and the corresponding verb can give us a glimpse of natural language understanding.
- Constraint Demo (SRL combine with tree structure)
S(theme:NP(Head:Nb:柯文哲)|theme:PP(Head:P21:在|DUMMY:NP(property:VP‧的(head:VP(time:Ndabd:國慶日|theme:VP(Head:VC2:穿|aspect:Di:了|goal:NP(quantifier:DM:一件|Head:Ncc:胸口))|Head:V_2:有|range:NP(property:Nab:國旗|Head:Nac:圖案))|Head:DE:的)|Head:Nb:T))|Head:VJ1:恤)
In this sentence 柯文哲 the Theme is being labeling, but its dependency still need to decide by the structure of the tree.
(P.s this demo was provided by CKIP Lab)
- Dependency Demo (SRL + Dependency tree parsing)
>>> SRL_Tagger.getInfo(“Stacker presents the 100 best fantasy movies of all time, as determined by a weighted index split evenly between IMDb and Metacritic scores.”)>>> [{‘A1’: ‘the 100 best fantasy movies of all time’, ‘A0’: ‘Stacker’, ‘AM-TMP’: ‘as determined by a weighted index split evenly between IMDb and Metacritic scores’, ‘V’: ‘presents’}, {‘A0’: ‘by a weighted index split evenly between IMDb and Metacritic scores’, ‘V’: ‘determined’}, {‘A1’: ‘a weighted index’, ‘AM-LOC’: ‘between IMDb and Metacritic scores’, ‘AM-MNR’: ‘evenly’, ‘V’: ‘split’}]
- Try this SRL demo by yourself
Here, we got these SRL
- A1(presents, the 100 best fantasy movies of all time)
- A0(presents, Stacker )
A0 = agent/theme , A1 = patient (some annotation system classify patient into Goal.)
(To check all the codes of semantic role, please refer to the appendix below.)
To make you more catchable. the meaning of each semantic role, I will put the explanation to make you read more easier.
- Patient — a disposable and affected object that a physical action is acted upon or undergoes a physical action
- Agent — a conscious actor which performs an action with control (on purpose) and has a physical, visible effect on object
- Theme — an object (1)which undergoes a change of location, possession, existence, category or quantity; (2) an original item which undergoes the event comparion.
As per our prediction, the meaning of the output can be read like this
- The patient of “presents” is “ the 100 best fantasy movies of all time”
- The agent/them of “presents” is “ Stacker ”.
Noted: Because its verb-centered, you can always find the same number of verbs and its’ clause.
Resource:
Git the code here …
Reference:
- http://www.nutramed.com/language/syntax_semantics.htm
- http://catherine98.blogspot.com/2013/11/linguistic-knowledge.html
- https://www.sciencedirect.com/science/article/pii/S0896627300808557