Element types in FMR
- Constants: Refer to specific objects in the world. A constant can be a number, a lexical string, or an entity.
- Classes: Semantic category of entities. For example:
location.city,math.number- Sub-class: math.number ⊆ math.expression
- Template classes: classes with one or more parameters, for example:
t.list<c, m, n>, wherecis a class,mandnare integers.
- Functions: The major way to form larger language units from smaller ones. A function is comprised of a name, a list of core arguments, and a return type.
- Noun functions
- Map entities to their properties or to other entities having specific relations with the argument(s).
- Are used to represent noun phrases in natural language.
- Pronoun functions are special zero-argument noun functions.
- Verb functions
- Act as sentences or sub-sentences
- The most important function type?
- Modifier functions
- Many functions can take additional extended arguments as their modifiers.
- Modifier functions often take the role of extended arguments to modify noun function, verb functions or other modifier functions.
- Are used in FMR as the semantic representation of adjectives, adverb phrases (including conjunctive adverb phrases), and prepositional phrases in NL
- Noun functions
- Entity Variables: Variables are assigned to FMR nodes for indicating the co-reference of sub-trees to entities.
Features of FMR
- Strongly typed language
- Type-compatibility: The type of each child of a function node should match the corresponding argument type of the function.
- Open-domain type system.
- Thousands of types
- Other languages: At most 100+ in grammar level
- Built-in data structures
- like
t.listandnf.list
- like
Semantic parsing from NL to FMR
By using CFG rules to map natural language sentences and phrases to FMR
"The product of 3 consecutive number is 60" =>
vf.be.equ(nf.math.product(nf.list(math.number, 3, mf.consecutive)), 60);
Origins
FMR grew out of the semantic understanding platform and voice assistant I worked on at Tencent/Sogou from 2013 onward:
- Compound entity recognition — via CRF, rules, and gazetteers
- Query intent understanding driven by a language model
- Template-based query intent recognition and semantic slot extraction
- A general CFG parser built on an efficient implementation of the Earley algorithm
- Intent recognition and slot filling
- Intent ranking, with a final arbitration module over the candidate intents
- Downstream category-specific knowledge bases and vertical search systems