• Title/Summary/Keyword: LR 문법

Search Result 20, Processing Time 0.024 seconds

Extended LR Methods for Efficient Parsing with Feature-based Grammars

  • Le, Kang-Hyuk
    • Korean Journal of Cognitive Science
    • /
    • v.15 no.1
    • /
    • pp.25-33
    • /
    • 2004
  • This paper discusses two problems with LR parsing with regard to constructing parsing tables with feature-based grammars. First, we show that traditional LR parsing methods suffer from nontermination and nondeterminism problems when they are applied to feature-based grammars. We then present an LR method for feature-based grammars that avoids both nontermination and nondetermisim by making use of partial information of a feature structure. Second, we describe the problem of adapting LR parsing to feature-based grammars with schematic rules (i.e., rules that do not contain enough information to construct parsing tables). To remedy this problem, we propose a rule inference algorithm which instantiates underspecified rules into more specified ones containing enough information.

  • PDF

A One-Gap Parsing with Extended PLR(1) Grammars (확장된 PLR(1) 문법에 대한 단일 틈 파싱)

  • Lee, Gyung-Ok
    • Journal of KIISE
    • /
    • v.42 no.3
    • /
    • pp.361-366
    • /
    • 2015
  • Gap parsing is an algorithm for parsing incomplete input strings which include some gaps. Gap parsing is different from conventional parsing, and as known results, one-gap parsing algorithms for arbitrary context-free grammar and LL(1) grammar have $O(n^3)$ and $O(n^2)$ time complexity, respectively. This paper presents a one-gap parsing algorithm for extended PLR(1) grammars. Extended PLR(1) grammars are the class of grammars smaller than LR(1) but much larger than LL(1). The one-gap parsing algorithm of the grammar class is shown to have the time complexity of $O(n^2)$, which is equal to the complexity of one-gap parsing algorithms for LL(1) grammars.

Characterization of LL languages (LL 언어의 특징화)

  • Lee, Gyung-Ok
    • Journal of KIISE:Software and Applications
    • /
    • v.29 no.1_2
    • /
    • pp.126-131
    • /
    • 2002
  • The problem whether a given grammar G generates an LL language or not is investigated in respect of LL transformable grammars. The previous work involves a nondeterministic intricated parser construction for the characterization of LL transformable grammars. The method hence does not give the intuitive understanding of the essence of LL languages. This paper suggests a characterization of LL transformable grammars based on grammatical derivations instead of the complicated parser construction. The new characterization contributes to intuitive understanding of the essence of LL languages.

Constructing a of Single State Parsing Automaton (단일 상태 파싱 오토마톤의 생성)

  • Lee, Gyung-Ok
    • Journal of KIISE:Software and Applications
    • /
    • v.35 no.11
    • /
    • pp.701-704
    • /
    • 2008
  • A general automaton allows multiple input transitions, so a special treatment is required when the history of transitions is needed. An LR automaton keeps the past transitions in the stack to use them during parsing. On the other hand, when each state in an automaton contains in itself the past transition history, the trace overhead of past transitions is unnecessary. The paper suggests a single state parsing automaton that does not depend on the past transitions. The applicable grammar class is less than LR grammars, but each state in a new automaton contains the past information, so the tracing of the history is not required compared to LR automaton.

Shift-first Strategy for Resolving Conflicts in the LR Parsing (LR 파싱에서 충돌 해결을 위한 Shift 우선 전략)

  • Lee, Yong-Seok;Hwang, Yi-Gyu
    • Annual Conference on Human and Language Technology
    • /
    • 1996.10a
    • /
    • pp.484-488
    • /
    • 1996
  • LR 파싱은 프로그래밍 언어를 위한 빠른 파싱 방법을 제공한다. 그러나 이 방법의 단점은 자연어와 같은 다양한 모호성을 가지는 문법에 적합하지 못하다. 모호성을 가지는 문법은 파싱 테이블 상에서 충돌을 야기하게 되는데 이를 해결하는 방법에 대한 연구가 많이 있어 왔다. 문장이 길어질 경우 구문 분석 도중 이러한 모호성이 파싱 효율에 큰 영향을 미치게 되는데, 본 논문에서는 Shift 우선 전략으로 LR 파싱의 효율적인 특징을 유지하면서 이러한 충돌을 해결할 수 있음을 보인다.

  • PDF

A Model of Probabilistic Parsing Automata (확률파싱오토마타 모델)

  • Lee, Gyung-Ok
    • Journal of KIISE
    • /
    • v.44 no.3
    • /
    • pp.239-245
    • /
    • 2017
  • Probabilistic grammar is used in natural language processing, and the parse result of the grammar has to preserve the probability of the original grammar. As for the representative parsing method, LL parsing and LR parsing, the former preserves the probability information of the original grammar, but the latter does not. A characteristic of a probabilistic parsing automaton has been studied; but, currently, the generating model of probabilistic parsing automata has not been known. The paper provides a model of probabilistic parsing automata based on the single state parsing automata. The generated automaton preserves the probability of the original grammar, so it is not necessary to test whether or not the automaton is probabilistic parsing automaton; defining a probability function for the automaton is not required. Additionally, an efficient automaton can be constructed by choosing an appropriate parameter.

Voice Calculator using LR Parsing Technique (LR 구문분석 기법을 이용한 음성 계산기)

  • 유형근;이형준;이강성;김순협
    • The Journal of the Acoustical Society of Korea
    • /
    • v.12 no.6
    • /
    • pp.70-76
    • /
    • 1993
  • 본 논문은 음성만을 이용하여 계산할 수 있도록 하는 dam성 계산기 구현을 위한 기술에 관한 연구이다. 일정한 형식을 갖는 언어에 의하여 발생할 수 있는 다양한 형태의 구문을 언어 문법적 규칙을 기초로 해석하는 기능은 단독어 인식에서 문장인식으로 넘어가는 과정에서 필수적인 요소이다. 음성 계산기에 HMM과 LR 구문분석 기법을 적용하여 입력된 문장을 분석하고 잘못 인식된 단어를 문장에 맞도록 하였다. 구문분석하는 중에 수식의 의미도 해석하여 계산 결과를 출력해 내도록 하였다. 구문 분석을 사용하지 않은 방법에 비해서 잘못 인식할 가능성을 크게 줄였다.

  • PDF

A Research on the Simplification of the Expression Attribute Grammar (수식 속성 문법 단순화에 대한 연구)

  • Chung, Yong-Ju
    • Journal of Korea Multimedia Society
    • /
    • v.14 no.2
    • /
    • pp.282-287
    • /
    • 2011
  • The attribute grammar is a grammar for static semantic rules to overcome the difficulties of type checking. But this attribute grammar is difficult to write and understand by its additional rules. A grammar would be preferable if it has simple and small size of an attribute grammar. This paper shows how to decrease the size of an attribute grammar for an expression using LH method. This approach considers the types of an expression. That is, the construction of a semantic relation between the types of the expression can make it possible that an attribute grammar be written with its simpler and smaller size.

Korean Dependency Structure Analyzer based on Probabilistic Chart Parsing (확률적 차트 파싱에 기반 한 한국어 의존 구조 분석기)

  • Eun, Ji-Hyun;Jeong, Min-Woo;Lee, Gary Geun-Bae
    • Annual Conference on Human and Language Technology
    • /
    • 2005.10a
    • /
    • pp.105-111
    • /
    • 2005
  • 정형적인 프로그래밍 언어에서는 언어를 기계적으로 해석하기 위해 입력의 구조적인 형태를 구축하는 파싱이 필수적인 과정으로 여겨진다. 기계에 기반 해서 개발된 프로그래밍 언어와 달리, 인간의 자유로운 의사소통을 위해 형성된 자연어는 특유의 다양성으로 인해 어휘, 구문, 의미 분석이 매우 어렵다. 반대로 자연어 구조 분석이 성공적으로 이루어지면 응용 시스템의 성능 향상에 상당한 기여를 할 것이라고 여겨지고, 이로 인해 끊임없이 자연어 처리, 특히 구문 분석에 많은 연구가 이루어지고 있다. 본 논문에서는 파싱에 사용되는 문법 전체를 말뭉치로부터 자동 구축하여 영역별 이식성 및 문법의 효율성을 도모했다. 또한 확률적 차트 파싱 기법과 immediate-head 파싱 모델을 적용하여 기존 파싱 시스템의 성능 향상을 시도했다. 세종 말뭉치를 이용한 파서의 성능은 각각 LP/LR 78.98%/79.55%로 나타났다.

  • PDF

An Efficient Node Reuse inIncremental Parsing Algorithms (효율적인 노드 재사용을 위한 점진적 파싱 알고리즘)

  • 박정윤;김영철;김상헌;유재우
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 1998.10b
    • /
    • pp.401-403
    • /
    • 1998
  • 점진적 파싱 알고리즘은 사용자 중심의 시스템 구현을 위한 핵심적인 기술의 하나이다. 오늘날 속성문법에서 사용되는 트리에는 노드에 파스서 상태와 심볼외에 평가된 속성 정보가 포함되므로 이 정보를 재사용하는 것이 바람직하다. 따라서 효율적인 점진적 파서는 파스트리상에서 생성된 노드를 효율적으로 재사용 할 수 있어야 한다. 본 연구에서는 이전의 파싱과정에서 생성된 노드를 효율적으로 재사용할 수 있는 쓰레드 트리를 기반으로 한 점진적 파싱 알고리즘을 제안하였다. 이전에 생성된 파스결과를 쓰레드 트리로 보관하고 이를 이용하여 효율적으로 노드를 재사용할 수 있도록 하였다. 제안된 알고리즘은 LR 기반의 파싱 방법에서 확장형 파싱표와 쓰레드 트리를 이용해 생성된 트리의 노드를 효율적으로 유지할 수 있다. 본 연구에서 제시된 알고리즘은 구문분석이 필요한 대화식 환경에서 효율적으로 사용될 수 있다.