Sentence
Sentence Structure
- โThe child found the puppyโ ๋ฌธ์ฅ์ ๋ค์๊ณผ ๊ฐ์ ํ
ํ๋ฆฟ์ ๊ธฐ๋ฐ์ผ๋ก ํ๋ค๊ณ ๋งํ ์ ์๋ค.
- DetโNโVโDetโN
- ์ด๊ฒ์ ๋ฌธ์ฅ์ด ๋ด๋ถ ๊ตฌ์กฐ๊ฐ ์๋ ๋จ์ด์ ๋ฌธ์์ด์ ๋ถ๊ณผํ๋ค๋ ๊ฒ์ ์๋ฏธ
- ๋ฌธ์ฅ์ ํ์ธต ์ง๋ฆฌ ๋๋ ทํ ๊ตฌ์กฐ๋ก ์ด๋ฃจ์ด์ ธ ์์ง ์๊ณ , ๊ณ์ธต์ ๊ตฌ์กฐ ๋ก ์ด๋ฃจ์ด์ ธ ์๋ค.
- ์ด ๋ฌธ์ฅ์ ์ค์ ๋ก ์ฌ๋ฌ ๊ทธ๋ฃน์ผ๋ก ๋๋ ์ ์๋ค
- ์ด๋ป๊ฒ ๊ฒฐํฉํ๋ ์ง์ ๋ฐ๋ผ ๋ง์ ์๋ฏธ๊ฐ ๋ฌ๋ผ์ง๋ค.
- ํธ๋ฆฌ ๋ค์ด์ด๊ทธ๋จ์ ๋ฌธ์ฅ์ ๊ณ์ธต ๊ตฌ์กฐ๋ฅผ ๋ณด์ฌ์ฃผ๋ ๋ฐ ์ฌ์ฉ๋๋ค.

Syntactic Categories
- ๋ฌธ๋ฒ์ฑ ์ ์์ง ์๊ณ ์๋ก๋ฅผ ๋์ฒดํ ์ ์๋ ํํ์ ์งํฉ์ด๋ค.
- ํํ๋ค์ ๋ฌถ์์ด๋ผ๊ณ ํ ์ ์๋ค. โ ๊ณตํต์ ๋ค์ ๊ฐ์ง๋ค.
- ์๋ก ์๋ก๋ฅผ ๋ด๊ฟ๋ ๋ฌธ๋ฒ์ ์ผ๋ก Ok. ์๋ฏธ๋ ๋ฌ๋ผ์ง์ง๋ง ๋ฌธ๋ฒ์ฑ์ ํด์ง์ง ์๋๋ค.
- ์ด๋ค ๋จ์ด๋์ ๋ฐ๋ผ ๋ฌธ๋ฒ์ฑ์ด ํด์ณ์ง ์๋ ์๋ค.
- ์๋ก ์๋ก๋ฅผ ๋ด๊ฟ๋ ๋ฌธ๋ฒ์ ์ผ๋ก Ok. ์๋ฏธ๋ ๋ฌ๋ผ์ง์ง๋ง ๋ฌธ๋ฒ์ฑ์ ํด์ง์ง ์๋๋ค.
๐ก example
The child found a puppy.
- ์์ด๊ฐ ๊ฐ์์ง๋ฅผ ์ฐพ์๋ค.
A police officer found a puppy.
- ์ฐ๋ฆฌ ๋๋ค ๊ฒฝ์ฐฐ๊ด ์์ ์จ๊ฐ ๊ฐ์์ง๋ฅผ ์ฐพ์๋ค.
Your neighbor found a puppy.
- Cf. ์ฐ๋ฆฌ ๋๋ค ๊ฐ์์ง๋ฅผ ๊ฒฝ์ฐฐ๊ด ์์ ์จ๊ฐ ์ฐพ์๋ค.
- ๋ชจ์์ด ๋ค ๊ฐ์ง ์์, ๊ทธ ์๋ฆฌ์ ์์ ๋ ๋ฌธ๋ฒ์ฑ ์ ํด์ง์ง ์์ผ๋ฉด ํ๋์ Category์ด๋ค.
Phrase Categories
- NP (๋ช ์ฌ๊ตฌ): men, the man, the man with a telescope
- VP (๋์ฌ๊ตฌ): sees, always sees, rarely sees the man, often sees the man with a
telescope, know who you are, slept on the bed - PP (์ ์น์ฌ๊ตฌ): over, nearly over, over the hill
- AdjP (ํ์ฉ์ฌ๊ตฌ): happy, very happy, very happy about winning
- AdvP (๋ถ์ฌ๊ตฌ): brightly, more brightly, more brightly than the Sun
- ์ด์์ด ์์ ๋ก์ด ์ธ์ด๋ผ๋ ํ๋์ ์นดํ
๊ณ ๋ฆฌ ์์ ๋ค๋ฅธ ์นดํ
๊ณ ๋ฆฌ๊ฐ ๋ค์ด๊ฐ๋ ์์ ์ด์
์ ๋ถ๊ฐ๋ฅํจ- ํ ๋ฉ์ด๋ฆฌ ์์ Category๋ฅผ ์ง์ผ์ผ ํ๋ค. ํ ๋ฉ์ด๋ฆฌ ์์ ๋ญ๊ฐ ๋ค์ด๊ฐ๊ฑฐ๋ ์ชผ๊ฐ์ง๋ฉด ์๋๋ค.
๐ก example
- ์ฐ๋ฆฌ ๋๋ค ๊ฒฝ์ฐฐ๊ด ์์ ์จ๊ฐ ๊ฐ์์ง๋ฅผ ์ฐพ์๋ค.
- ๊ฐ์์ง๋ฅผ ์ฐ๋ฆฌ ๋๋ค ๊ฒฝ์ฐฐ๊ด ์์ ์จ๊ฐ ์ฐพ์๋ค.
- ์ฐ๋ฆฌ ๋๋ค ๊ฐ์์ง๋ฅผ ๊ฒฝ์ฐฐ๊ด ์์ ์จ๊ฐ ์ฐพ์๋ค.
- *์ฐ๋ฆฌ ์ฐพ์๋ค ๋๋ค ๊ฒฝ์ฐฐ๊ด ๊ฐ์์ง๋ฅผ ์์ ์จ๊ฐ โ Category ์ชผ๊ฐ์ง (ํ๋ฆผ)
Penn Treebank Tagset


Korean POS tagging
- ์๋ฒฝ 4์์ ์ ํ๋ฅผ ๊ฑธ ์ ์๋ ์น๊ตฌ๋ผ๋ฉด ์ค์ํ ์น๊ตฌ์ด๋ค. ๋ถํ์ ๋๊ฐ ์ง์ ํ ์น๊ตฌ๊ฐ ์๋ ์ง๋ฅผ ๋ณด์ฌ์ค๋ค.
- ํ๊ตญ์ด๋ Morpheme์ ๋๋ ์ผ ํ๊ธฐ ๋๋ฌธ์ decompose๊ฐ 1๋ฒ
- compose๋ ์์์ผํ๋ค.

Phrase Structure Rules
- PS ๊ท์น์ ํ์๊ฐ ์ธ์ด์ ๊ฐ๋ฅํ ๊ตฌ์กฐ์ ๋ํด ๊ฐ์ง๊ณ ์๋ ์ง์์ ํฌ์ฐฉ.
- PS ๊ท์น์ ๋ฌธ๋ฒ์ ์ผ๋ก ํธ๋ฆฌ๊ฐ ์ผ์นํด์ผ ํ๋ ํ ํ๋ฆฟ.
- ํ์ฌ tagํ โ ๊ท์น์ ๋ง๋ค์ด์ผ ํ๋ค.
- ๋ญ & ๋ญ๋ ์กฐํฉํ ์ง ๊ท์น์ ์ ํด์ผ ํ๋ค.
- Morpheme(ํํ์) ๋จ์๋ก ์ชผ๊ฐ๊ณ , ํ์ฌ tagํ ๊ท์น์ ์ ์ฐ๋ฉด ๋๋ค. โ ๊ท์น์ ์ ์ฐ๋แซ ๊ฒ ์ด๋ ค์.
- ์๋ก ๊ฒน์น์ง ์๊ฒ ์ฐ๋๊ฒ ์ด๋ ค์. 1&2๋ฒ ๋ฌธ์ฅ ๊ฐ์ด ๋ฃ๊ณ ๋๋ฆฌ๋ฉด, ๊ท์น๋ค ๋ผ๋ฆฌ ์ถฉ๋ํ์ฌ 1,2๋ฒ ๋ฌธ์ฅ ๋ ๋ค ์ ๋๋ก ๋์ค์ง ์์
- (์ถฉ๋ ๋์ง ์๊ฒ ์ฌ์ฉํ๋ ๊ฒ์ด ๋งค์ฐ ์ด๋ ค์)
๐ก Examples of the PS rules
โข S -> NP VP
โข NP -> Det N
โข VP -> V NP
โข VP -> V
โข VP -> V PP
โข VP -> V CP
โข PP -> P NP
โข CP -> C S
Phrase Structure Trees
- Phrase Structure (PS) ํธ๋ฆฌ๋ ๊ตฌ๋ฌธ ๋ฒ์ฃผ ์ ๋ณด์ ํจ๊ป Structure์ ๋ด๋ถ ๊ตฌ์กฐ๋ฅผ ๋ณด์ฌ์ค๋ค.
๐ก [[the] [child]] [[found] [[a] [puppy]]

- ํ๋์ category์์ core๋ head, complement๋ head(core) ๋ณด์ถฉํ๋ ์ฉ๋.
- ๋ชจ๋ Phrase์ ์ค์ฌ์ Head ์ด๋ค.
๐ก example
- In the VP walk the pugs, the verb walk is the head.
- ๊ฐ์์ง๋ฅผ ์ฐพ์๋ค
- head ์์์ ๋ฐ์ํ ์ ์๋ head์ ์๋ฏธ๋ฅผ ์์ธํ ์ค๋ช ํ๋ ๊ฒ์ complement์ด๋ค.
๐ก example
- In the PP over the river, the NP the river is the complement.
- ์ํ์ ๊ฐ๋ฅด์น๋ ์ ์๋
- PS Tree์์, ์์ node๋ ๊ทธ ์๋ Category๋ฅผ ์ง๋ฐฐํ๋ค.
- node๋ ๊ทธ ์๋ Category ์ง๋ฐฐ
- Sister๋ ๋์ผํ Node์ ์ํด ์ฆ์ ์ง๋ฐฐ ๋๋ Category
- V & NP๋ Sisters
- node๋ ๊ทธ ์๋ Category ์ง๋ฐฐ
How words form groupsโฆ?
- ์์์ ์ํด์ ์ค์์ฑ ์ด ์๊ธฐ๊ณ , ํด์๊ฐ ๋๋ค.
- ์๋ฏธ๋ ๋ฌธ์ฅ ์์ ๋จ์ด๋ค์ด ์ด๋ป๊ฒ ๋ฌถ๋ ์ง์ ๋ฐ๋ผ ๋ฌ๋ผ์ง๋ค.
- context ์์ด ๋ฌธ์ฅ์ ์ด๋ป๊ฒ ๋ฌถ์์ง ๊ฒฐ์ โ context ์์ผ๋ฉด ๋ฌธ์ฅ์ ์ค์์ฑ ํด์ ์๋จ.
๐ก example (English)
- The captain ordered the [old [men and women]] off the ship.
- The captain ordered the [old men] and [women] off the ship.
๐ก example (Korean)
- ๋์ด๋ ๋จ์์ ์ฌ์
- [๋์ด๋ [๋จ์์ ์ฌ์]]
- [๋์ด๋ ๋จ์]์ [์ฌ์]
๐ก Ambiguity (์ค์์ฑ) - example
- For sale: an antique desk suitable for lady with thick legs and large drawers.
- For sale: [an antique desk suitable for lady] with thick legs and large drawers.
- For sale: an antique desk suitable [for lady with thick legs and large drawers].
- ์ด๋จธ๋๋ ์๋ฒ์ง๋ณด๋ค ๋ธ์ ๋ ์ฌ๋ํ๋ค.
- ์ฒ ์๊ฐ ์ข์ํ๋ ์ํฌ์ ๋์์ ๋ง๋ฌ๋ค.
- ์์๋ ์๋ฒ์ง์ ๊ทธ๋ฆผ์ ์ข์ํ๋ค.
- 3๊ฐ์ง ์๋ฏธ: ์๋ฒ์ง๊ฐ ๊ทธ๋ฆฐ ๊ทธ๋ฆผ, ์์ฅํ ๊ทธ๋ฆผ, ์ฃผ์ธ๊ณต์ธ ๊ทธ๋ฆผ (์ดํ์ ์ค์์ฑ)
- ์ํฌ๊ฐ ๋ณด๊ณ ์ถ์ ์น๊ตฌ๋ค์ด ๋ง๋ค.
- ์ฒ ์์ ์ํฌ๊ฐ ๊ฒฐํผํ๋ค.
์ฐ๋ฆฌ๋ ์ด๋ป๊ฒ ๊ทธ๋ฌํ ๋ฌธ์ฅ๋ค์ ๋ช ํํ๊ฒ ํ ์ ์์๊น??
- hierarchically (๊ณ์ธต์ ์ผ๋ก)
- ์ด๋ป๊ฒ ๊ทธ๋ฃน์ ๋ฌถ๋์ง ์ ๋ฐ๋ผ ์๋ฏธ๊ฐ ๋ฌ๋ผ์ง
- ๋งฅ๋ฝ, ์ด์กฐ, ํด์ง
- ์ด๋ป๊ฒ ๊ทธ๋ฃน์ ๋ฌถ๋์ง ์ ๋ฐ๋ผ ์๋ฏธ๊ฐ ๋ฌ๋ผ์ง
์ดํ์ ๋ชจํธ์ฑ ์์(Examples of lexical ambiguity)
๐ก example
- This will make you hot.
- ์ฒ ์์ ๋ง์ด ์ฐธ ๋น ๋ฅด๋ค.
- ์ฒ ์์ ์ง์ด ๊ธฐ์ธ์๋ค.
- ๋น์๊ฐ ์ฐจ๋ฅผ ์ค๋นํ๋ค.
- ์ฒ ์์๊ฒ ๊ทธ ์ ๋์ ํ์ ์๋ค.
- ์ํฌ๊ฐ ๋ชจ์๋ฅผ ์ฐ๊ณ ์๋ค.
๋ ๋ค๋ฅธ ๋ชจํธ์ฑ์ ์ (Examples of another ambiguity)
๐ก example
- ๋ชจ๋ ๋จ์๋ค์ด ํ ์ฌ์๋ฅผ ์ฌ๋ํ๋ค.
- ๋ ๋ช ์ ์ฌ๋ฅ๊พผ์ด ๋ค ๋ง๋ฆฌ์ ํ ๋ผ๋ฅผ ์ก์๋ค.
- ์์ด๊ฐ ์ง์ ๊ฐ์ง ์์๋ค.
Structural Ambiguities
- The boy saw the man with the telescope. - ์๋ ์ ๋ง์๊ฒฝ์ผ๋ก ๊ทธ ๋จ์๋ฅผ ๋ณด์๋ค.
๐ก ์๋ฏธ๋ ๋ค์๊ณผ ๊ฐ๋ค.
- The boy used the telescope to see the man. - ์๋ ์ ๊ทธ ๋จ์๋ฅผ ๋ณด๊ธฐ ์ํด ๋ง์๊ฒฝ์ ์ฌ์ฉํ๋ค.
- The boy saw the man who had a telescope. - ์๋ ์ ๋ง์๊ฒฝ์ ๊ฐ์ง ๋จ์๋ฅผ ๋ณด์๋ค.

Selection
- ๊ตฌ์กฐ, ์๋ฏธ์ ๊ท์น์ ๋ค๋ฃฌ๋ค.
- ๊ณผ๊ฑฐ์ NLP์์๋ ์ ์ฝ์กฐ๊ฑด์ ๋ง๋ ๋ฌธ์ฅ์ผ๋ก ์ธ์๋๊ฒ ํ๋ค.
- ๊ท์น์ ๊ฐ์ง๊ณ ๋ง์ input์ ๋ฃ๊ธฐ๋ ํ์ผ๋ ์์ฆ์ ๊ทธ๋ฐ ๋ฐฉ์์ ์์
- ๋ฌธ์ฅ์ด ์ ํ์ฑ๋๊ธฐ ์ํด์๋ PS ๊ท์น์ ๊ตฌ์กฐ์ ์ ์ฝ์กฐ๊ฑด์ ๋ถํฉํด์ผ ํ๋ฉฐ, ๊ฐ ๊ตฌ์ ๋จธ๋ฆฌ ๋ถ๋ถ์ ํต์ฌ์ (C-์ ํ)๊ณผ ์๋ฏธ๋ก ์ (S-์ ํ) ์๊ฑด๋ ์ค์ํด์ผ ํ๋ค.
- ์ ์ฉ ํ๋๊ฒ์ด ์ฝ์ง๊ฐ ์๋คโฆ. ์ด๋ ค์์ ใ
- ๋ฌธ๋ฒ์ ์ผ๋ก ๋ค์ NP(๋ชฉ์ ์ด) ํ์, ๋ฌธ๋ฒ์ , ์๋ฏธ์ ์ผ๋ก๋ ํ์ํ ๊ฒ์ด ์์
- C-selection or subcategorization์ head๊ฐ ์ทจํ ์ ์๊ฑฐ๋, ์ทจํด์ผ ํ๋ complement type์ ๋ํ ์ ๋ณด ์๋ฏธ.
- S-selection์ ๋์ฌ์ ์๋ฏธ๋ก ์ ํน์ฑ์ ๋ฐ๋ผ subject(์ฃผ์ด)์ complement(๋ณด์ด) ์ ํ
- ๋์ฌ murder๋ ์ฌ๋์ ๋ํ subject & object๊ฐ ํ์ โ ์์ feature๋ฅผ ์ ๋ฆฌํํ, ๊ถํฉ ๋ง์ผ๋ฉด ok, ์๋ง์ผ๋ฉด X๋ผ๊ณ ํ๋จํ๋ค.
๐ก example - Verb Murder
The beer murdered the lamp.
(! Indicates a semantic anomaly)
!๋งฅ์ฃผ๊ฐ ๋จํ๋ฅผ ์ฃฝ์๋ค
-
- ๋์ฌ drink๋ ์ฃผ์ด๋ animate๊ฐ ์์ด์ผ ํ๊ณ , ์ ํ์ object complement๋ liquid์ฌ์ผ ํ๋ค.
๐ก example - Verb drink
The beer drank the lamp.
๋งฅ์ฃผ๊ฐ ๋จํ๋ฅผ ๋ง์ จ๋ค
๐ก example
Enormous crickets in pink socks danced at the prom.
๋ฌด๋ํ์์ ๋ถํ์ ์๋ง์ ์ ์ ๊ฑฐ๋ํ ๊ท๋๋ผ๋ฏธ๊ฐ ์ถค์ ์ถ์๋ค.
Colorless green ideas sleep furiously.
๋ฌด์์ ๋ น์ ์ฌ์์ ๋งน๋ ฌํ ์๋ค.
'๐ NLP (์์ฐ์ด์ฒ๋ฆฌ) > ๐จ๏ธ Linguistic Engineering' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Semantics & Pragmatics] The meaning of language - ์๋ฏธ๋ก , ์ด์ฉ๋ก (0) | 2024.01.16 |
---|---|
[Syntax] Syntactic analysis in NLP - NLP์์ ๊ตฌ๋ฌธ๋ถ์ (0) | 2023.07.26 |
[Syntax] Syntax Intro - ๊ตฌ๋ฌธ (0) | 2023.07.26 |
[Words] Words - ๋จ์ด (0) | 2023.07.23 |
[Intro] Introduction to Language Engineering - ์ธ์ด๊ณตํ๊ฐ๋ก (0) | 2023.07.23 |