Insert lemmas and syncon IDs
When writing categorization and extraction rules, you often need to enter lemmas and syncon IDs, for example as arguments of attributes like SYNCON
, LEMMA
, LIST
, etc. Studio offers you a lot of help with this.
Use the Knowledge Graph tool window
With the Knowledge Graph tool window you can choose and insert lemmas and syncon IDs directly in the code by choosing them from the Knowledge Graph.
You can also insert an entire attribute like SYNCON
complete with its arguments without having to write it yourself.
- Place the cursor where you need to insert the syncons, the lemmas or the entire attribute.
- Open the Knowledge Graph tool window.
- Find the syncons.
- Pin the syncons or their lemmas.
- Commit your choices.
Use the Knowledge Graph Search tool window
The Knowledge Graph Search tool window has less features than the Knowledge Graph, but it can be easier to use.
See these articles to learn how to use it to:
Use smart completion
Syncon from lemma
Studio is able to auto-complete rules language statements, so if you enter an attribute requiring a syncon ID, like SYNCON
, and you are specifying its arguments:
- Start writing a lemma that you would use to find the syncons: smart completion shows the list of syncons containing that lemma.
- Choose a syncon from the list: the ID of the selected syncon gets written in the code.
Lemmas
If you enter an attribute requiring a lemma, like LEMMA
, and you are specifying its arguments:
- Start writing a lemma: smart completion shows the list of lemmas that begin with the string you have entered.
- Choose a lemma from the list.
Copy-and-paste
Another way to insert lemmas and syncon IDs is to paste them from the clipboard.
You can copy lemmas and syncon IDs from any source, inside or outside the Studio IDE. Here follow some useful tips for finding and copying lemmas and syncon IDs from the tool windows in which they mainly appear.
Copy syncon IDs
To copy syncon IDs from the Knowledge Graph tool window:
- Select a syncon (multiple selection with
Ctrl-click
is allowed). - Right-click the selection and choose Copy selected syncon ID.
Or:
- Select one or more syncons in the syncons strip or in the Pinned Syncons and Lemmas panel.
- Right-click the selection and choose Copy selected syncon ID.
In case of multiple selection, syncon IDs will be copied to the clipboard as a comma separated sequence.
To copy syncon IDs from the Semantic Analysis tool window:
- Right-click a tile corresponding to a concept at the word, atom or text level and choose Copy ID.
Or:
- Select a tile corresponding to a concept at the word, atom or text level.
-
In the details panel on the right, right-click anywhere and choose Copy Syncon ID
Or:
If the concept has one or more parents along a hierarchical link, right-click anywhere and choose Copy parent #n ID, where n is the number of the parent syncon, as it can happen—even if it is rare—that a syncon has multiple parents.
Copy lemmas
To copy lemmas from the Knowledge Graph Search tool window:
- Select one or more syncons inside the Syncons panel.
- Right-click the selection and choose Copy All Lemmas. The lemmas will be copied to the clipboard on separate lines.
To copy collocations from the Knowledge Graph Search tool window:
- Select one or more collocations inside the Collocations panel.
- Right-click the selection and choose Copy selected collocations.
If you want to copy all collocations, right-click anywhere inside the Collocations panel and choose Copy all collocations.
Collocations will be copied to the clipboard on separate lines.
To copy a lemma from the Semantic Analysis tool window:
- Select a tile corresponding to a concept at the word, atom or text level.
- In the details panel on the right, right-click anywhere and choose Copy Base Form.