Language Model Grammar Conversion Wesley Holland, Julie Baca, Dhruva Duncan, Joseph Picone Center for Advanced Vehicular Systems Mississippi State University.

Slides:



Advertisements
Similar presentations
Semantics Static semantics Dynamic semantics attribute grammars
Advertisements

Natural Language Processing - Formal Language - (formal) Language (formal) Grammar.
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
Translator Architecture Code Generator ParserTokenizer string of characters (source code) string of tokens abstract program string of integers (object.
Chapter Chapter Summary Languages and Grammars Finite-State Machines with Output Finite-State Machines with No Output Language Recognition Turing.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
ISBN Chapter 3 More Syntax –BNF –Derivations –Practice.
PZ02A - Language translation
Regular Expression to NFA-  (a+ba) * a. First Parsing Step concatenate (a+ba) * a.
Fall 2007CS 2251 Miscellaneous Topics Deque Recursion and Grammars.
Normal forms for Context-Free Grammars
Chapter 3: Formal Translation Models
COP4020 Programming Languages
Cs466(Prasad)L8Norm1 Normal Forms Chomsky Normal Form Griebach Normal Form.
Context-free Grammars
Syntactic Pattern Recognition Statistical PR:Find a feature vector x Train a system using a set of labeled patterns Classify unknown patterns Ignores relational.
Chapter 9 Turing Machine (TMs).
Language Translation Principles Part 1: Language Specification.
Languages & Strings String Operations Language Definitions.
Winter 2007SEG2101 Chapter 71 Chapter 7 Introduction to Languages and Compiler.
Syntax Specification and BNF © Allan C. Milne Abertay University v
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
1 Chapter 3 Describing Syntax and Semantics. 3.1 Introduction Providing a concise yet understandable description of a programming language is difficult.
Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided by author Slides edited for.
Languages, Grammars, and Regular Expressions Chuck Cusack Based partly on Chapter 11 of “Discrete Mathematics and its Applications,” 5 th edition, by Kenneth.
Grammars CPSC 5135.
PART I: overview material
Introduction to Language Theory
Language Model Grammar Conversion Wesley Holland Intelligent Electronic Systems Human and Systems Engineering Department of Electrical and Computer Engineering.
Copyright © by Curt Hill Grammar Types The Chomsky Hierarchy BNF and Derivation Trees.
1 Syntax Specification (Sections ) CSCI 431 Programming Languages Fall 2003 A modification of slides developed by Felix Hernandez-Campos at UNC.
Bernd Fischer RW713: Compiler and Software Language Engineering.
2. Regular Expressions and Automata 2007 년 3 월 31 일 인공지능 연구실 이경택 Text: Speech and Language Processing Page.33 ~ 56.
Release Progress Report Daniel May Intelligent Electronic Systems Human and Systems Engineering Department of Electrical and Computer Engineering min XMLABNF.
CPS 506 Comparative Programming Languages Syntax Specification.
Topic #1: Introduction EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
Copyright © Curt Hill Finite State Automata Again This Time No Output.
Context Free Grammars CFGs –Add recursion to regular expressions Nested constructions –Notation expression  identifier | number | - expression | ( expression.
1 Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
1 / 48 Formal a Language Theory and Describing Semantics Principles of Programming Languages 4.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
The Interpreter Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Programming Languages and Design Lecture 2 Syntax Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Regular Grammars Reading: 3.3. What we know so far…  FSA = Regular Language  Regular Expression describes a Regular Language  Every Regular Language.
November 2003Computational Morphology III1 CSA405: Advanced Topics in NLP Xerox Notation.
LECTURE 4 Syntax. SPECIFYING SYNTAX Programming languages must be very well defined – there’s no room for ambiguity. Language designers must use formal.
Language Translation Part 2: Finite State Machines.
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture 1 Ahmed Ezzat.
1 Chapter 3 Regular Languages.  2 3.1: Regular Expressions (1)   Regular Expression (RE):   E is a regular expression over  if E is one of:
Mid-Terms Exam Scope and Introduction. Format Grades: 100 points -> 20% in the final grade Multiple Choice Questions –8 questions, 7 points each Short.
Chapter 3 – Describing Syntax CSCE 343. Syntax vs. Semantics Syntax: The form or structure of the expressions, statements, and program units. Semantics:
Department of Software & Media Technology
Language Model Classes
Chapter 3 – Describing Syntax
Context-Free Grammars: an overview
Complexity and Computability Theory I
Automata and Languages What do these have in common?
Natural Language Processing - Formal Language -
Formal Language Theory
Language Recognition (12.4)
Department of Software & Media Technology
CHAPTER 2 Context-Free Languages
Language Recognition (12.4)
Overview of Language Model Classes and Release Progress
High-Level Programming Language
Language Model Grammar Conversion
Lecture 5 Scanning.
Presentation transcript:

Language Model Grammar Conversion Wesley Holland, Julie Baca, Dhruva Duncan, Joseph Picone Center for Advanced Vehicular Systems Mississippi State University XMLABNF BNF IHD BNF JSGF

Page 1 of 10 Language Model Grammar Conversion Speech Recognition Acoustic Model Maps audio data to words or phonemes Language Model Specifies order in which a sequence of words or phonemes is likely to occur Described using grammar

Page 2 of 10 Language Model Grammar Conversion Grammar Specifications Backus-Naur Form (BNF) Augmented BNF (ABNF) JSpeech Grammar Format (JSGF) Speech Recognition Grammar Specification (SRGS) ISIP Hierarchical Digraph (IHD) ::=ab* =a(b)*; a b BNF ::=aB ::=bB ::=ε ABNFJSGF XML-SRGSIHD

Page 3 of 10 Language Model Grammar Conversion Conversion Design Goals JSGF ↔ IHD XML-SRGS ↔ IHD Determination of equivalence Grammar minimization Final Architecture XML JSGF ABNFBNFIHD

Page 4 of 10 Language Model Grammar Conversion JSGF/XML-SRGS → ABNF JSGF → ABNF Trivial Similar in syntax and structure to ABNF XML-SRGS → ABNF Harder than JSGF Different in syntax and structure from ABNF Requires enumeration of certain repeat attributes ::=(ab)|(abab) XML-SRGS a b ABNF ::=abab(ab)* a b

Page 5 of 10 Language Model Grammar Conversion JSGF/XML-SRGS → ABNF XML-SRGS → ABNF (continued) Different weighting mechanisms (weight and repeat-prob attributes) a b c d

Page 6 of 10 Language Model Grammar Conversion ABNF → BNF Normalized BNF Consists of rules of the following formats: (RULE_NAME)::=(TERMINAL),(NON_TERMINAL) (RULE_NAME)::=(NON_TERMINAL) (RULE_NAME)::=ε ABNF BNF 1.Break rule into multiple rules at each top-level alternation. Recurse on each rule. 2.For each concatenation, Kleene star, or Kleene plus, extract a set of left symbols and a set of right symbols. 3.For n left symbols and m right symbols, create n x m connecting rules. ABNF → BNF Complicated Accomplished using a recursive algorithm that extracts sets of normalized BNF rules from a set of ABNF rules

Page 7 of 10 Language Model Grammar Conversion BNF ↔ IHD Each arc translates to a normalized BNF Terminals correspond to nodes; concatenations correspond to arcs RS→R0R3→C,R3 RS→R1R3→C,RT R0→A,R3RT→ε R1→B,R3 BNF Nodes 1: A 2: B 3: C Arcs (S,1)(2,3) (S,2)(3,3) (1,3)(3,T) IHD

Page 8 of 10 Language Model Grammar Conversion BNF → JSGF/XML-SRGS Rule-by-rule Trivial =aB; =b*; a b <ruleref special= “NULL”/> BNF ::=aB ::=bB ::=ε JSGF XML-SRGS

Page 9 of 10 Language Model Grammar Conversion Software Tools ISIP Network Converter Console tool to perform conversions to and from arbitrary grammar formats ISIP Network Builder Java-based graphical tool to design grammars as finite state machines Can exports grammars to JSGF, XML-SRGS, ABNF, BNF, and IHD ISIP Language Model Tester Console tool for testing of grammars Can generate valid sentences in a given grammar Can parse sentences and determine if accepted by a given grammar.

Page 10 of 10 Language Model Grammar Conversion Minimization Happens in BNF Iterate over rule set, merging redundant rules Rules can be merged if the non terminal of both rules reference the same terminal Example: