# Syntactic analysis in NLP

박경민·2023년 7월 4일

[Linguistics]

목록 보기
5/7

Parsing

Constituency Parsing >> understand the structure of the sentence

  • starting unit: words are given a category
  • Words combine phrases with categories
  • Phrases can combine into bigger phrases

Dependency Parsing >> understand the relationship between words

Dependency grammar

DG에서 구성요소는 head 와 dependents 이다. "John hit the ball" 이란 문장에서 hit 이 head 이며, John, ball 이 dependents 가 될 수 있다. ball 이 head 가 될 수 있으며, 이때 dependents 는 the 다.

  • 중심이 head, 수식해주는 것들이 dependent 로 화살표를 묶으면 된다.
  • 한쪽 방향으로 묶을 필요가 없다. (어순이 자유로운 언어에서도 사용 가능)
  • 한국어는 free in word order, omission 이 많으므로 Dependency grammar 을 이용한다.

Partial parsing

  • Full parse trees >> 일반적으로 지금까지 우리가 본 tree 로, 복잡하고 시간이 많이 든다. 모든 NLP application 에서 잘 동작하는 것도 아니고, noisy surroundings 상황에서 효과 X

  • Simler parsing >> 복잡한 Full tree 와 달리 시간과 복잡도를 줄일 수 있다. 어떤 NLP task 는 무조건 full tree만을 요구하지 않기 때문! (Partial parsing)

Partial Parsing
recover syntactic information efficiently and reliably from unrestricted text. shallow parsing, chunking 이라고도 부른다.

Chunking 을 할 때는 overlapping 하지 않는다. = 겹치지 않는다. 또한 non-recursive 이며(= 1층에서 만난다)

content word 기준 phrase 로 나눈다. (NP, VP, AP, PP) 따라서 "The morninf flight from Denver has arrived." 라는 문장이 있다면 [The morning flight][from] [Denver][has arrived.]" 으로 segmenting 한다. 그 뒤에 NP, PP, NP, VP 라는 태그를 다는 과정은 Labeling. 이렇게 flat 하게 보기 때문에 ambiguity 는 생각하지 않는다고 볼 수 있다.

  1. headword를 구의 처음에 포함한다
  2. 어떠한 post-head material 이라도 무시한다.
profile
Mathematics, Algorithm, and IDEA for AI research🦖

0개의 댓글