[Documentation] [TitleIndex] [WordIndex

Only released in EOL distros:  

roboframenet: arbitrator | executor | frame_registrar | imperative_to_declarative | location_memorizer | moo | move_action_server | move_base_rfn | pr2_props_rfn | rfnserver | roboframenet_bringup | roboframenet_msgs | semantic_framer | stanford_parser | stanford_parser_msgs | stanford_parser_ros | stop_server | turtlebot_follower_rfn | utter

Package Summary

semantic_framer manages lexical units and fits parsed sentences to them. The semantic framer manages lexical units, akin to FrameNet but designed for robotics, which are accessible by a given verb. The semantic framer communicates with other nodes by providing interfaces for adding lexical units (through yaml files) and for filling lexical units (given a parse).

What are Lexical Units?

In RoboFrameNet, a lexical unit provides a mapping from parsed natural language to semantic frames. Lexical units contain a verb, which is said to evoke a semantic frame, as well as the verb's dependencies, for instance the verb's direct object, indirect object, etc.

Creating and Adding New Lexical Units

The natural language processing capabilities of RoboFrameNet can be extended by creating new lexical units and adding them into semantic_framer. This guide will help you create new lexical units and add them to RoboFrameNet.

Creating Lexical Units

Overview and Examples

Files are in standard yaml notation. The layout is most explained by example; individual elements will be described below.

This is a minimal example, which binds the verb "moo" to the "mooing" semantic frame:

frame_name: mooing
verb: moo

This is a "maximal" example, which will bind sentences such as "Move forward 2 feet." to the moving semantic frame:

frame_name: moving
verb: [go, move, drive]
description: ""
frame_element_grammatical_relations:
  - name: direction
    relation: prt
  - name: distance_unit
    relation: dobj
  - name: distance
    relation: num/dobj

See also the corresponding example frames for frame_registrar.

Notation

Below, the phrase "one or more" for an entry signifies that either a single instance can be entered, or a list of multiple instances can be entered. For instance, with verb, "one or more verbs" means all the following entries are legal:

verb: moo
verb: [moo]
verb: [moo, speak]

Required Values

Each lexical unit must specify the following values:

Optional Values

Each lexical unit may specify the following values:

frame_element_grammatical_relations is a list. Each entry in this list must have the following values:

Determining relations

Assuming one is using stanford_parser_ros, a complete set of relations can be found in the Stanford Dependencies Manual.

Additionally, relations can be found empirically. First, start the natural language processing half of roboframenet:

roslaunch roboframenet_bringup nlp.launch

Then, send example sentences:

rostopic pub command std_msgs/String "Pick up the red ball."

The terminal which is running nlp.launch will display the resultant parse tree and dependencies:

(ROOT (S (NP (PRP You)) (VP (VBP pick) (PRT (RP up)) (NP (DT the) (JJ red) (NN ball))) (. .)))
nsubj(pick-2, You-1)
prt(pick-2, up-3)
det(ball-6, the-4)
amod(ball-6, red-5)
dobj(pick-2, ball-6)

(Note: The implicit "you" was added by imperative_to_declarative.)

Multiple Lexical Units in a Single File

A single yaml file can also contain multiple lexical units. In this case, the lexical units are just a top level list:

- frame_name: mooing
  verb: moo
  [...]

- frame_name: navigating
  verb: move
  [...]

Adding Lexical Units to RoboFrameNet

rfnserver allows you to add lexical units in the form of yaml files to the RoboFrameNet framework.


2024-11-02 17:25