In the PrimaryInterface, using the ?/help command (or typing ?/help <command>) offers detailed information about available commands and their specific features. It's important to note that this identical behavior applies to AUX_interfaces as well.
1. LS_Interface
When executing ls on a Node with only a single field selected in the placeholder's fielding region, the LS_Interface is activated. This interface enables interaction following the display of nodes contained within the current node.
Here's a list of the commands available for use in this context.
Note that the DEL, GRAB, MV and CP functions support ranges insted of single indexes. That is, they can process 5-8 instead of 5 6 7 8 .
This command takes one and only argument index and changes the current node context in the parent CLI (SKCLI). The index is expected to be an integer (or a string that can be converted to an integer) and is used to select the node from the listed_nodes list.
18:25:32 ~ [es][n]@[Cocodrilo(NA)]/[y1]: ls
(SYS: Started edit-session at 18:42:41)
| Showing 6/6 results.
| 1. AligΓ‘tor | 3. CaimΓ‘n negro | 5. Reptil
| 2. CaimΓ‘n | 4. Depredador | 6. Saurio
>> cd 1
18:42:44 ~ [es][n]@[AligΓ‘tor(NA)]/[y1]:
Unlike the do_ls function from the PrimaryInterface, this command does not accept arguments. However, it is still especially useful when the original print of the content within the current node is out of sight or has been edited.
It updates the self.listed_nodes and then generates a formatted list of nodes' names for display. The formatting involves arranging the nodes' names into a specified number of columns with a specified width (controlled by self.ls_args.ncol and self.ls_args.width).
Given the indexes of the nodes we want to delete, del unbinds them correspondely in the graph. Once it is done, it automatically calls the ls command to display the updated content. Also, del function supports index ranging.
Also, clear can be used to fully delete the connections for the given field of the node.
00:53:49 ~ [es][n]@[Dosel(NA)]/[y1]: ls
(SYS: Started edit-session at 00:53:49)
Showing 4/4 results.
| 1. Colgadura | 3. Tela
| 2. Cortina | 4. Velo
>> clear
SYS: Are you sure you want to clear this field? [Y/N]
>> y
Field succesfully cleared.
00:53:49 ~ [es][n]@[Dosel(NA)]/[y1]:
When a single name name (undergoes capitalization for consistency) is inputed in the CLI, it will try to bind it to the plahecolder node through the set fielding. From here, many scenarios arise.
The function attempts to find an existing node with this name in the graph. If more than one match is found, the user is presented with these options and can choose one or opt for none, using a selection interface.
In case no existing node matches or the user chooses not to select an existing node, the function offers the user the option to create a new node. Here, the user inputs the new node's language, type, and lemma (optional, set as NA by default), which are then used to create and add the node to the graph if it doesn't already exist with those characteristics.
Once a node is either selected from existing ones or newly created, the function proceeds to bind this node with the current node in focus (self.ls_node) in the graph, unless it's already a neighbor.
The function operates in a loop, allowing for the addition of multiple nodes in succession, wich continues until the user decides not to add more nodes, at which point the function concludes and resumes the edit session.
16:49:10 ~ [es][n]@[Piso(NA)]/[y1]: ls
(SYS: Started edit-session at 16:49:11)
Showing 5/5 results.
| 1. Casa | 3. Pisito de so... | 5. Vivienda
| 2. Nivel | 4. Piso franco
>> Planta
| Did you mean...
| 1) [es][j]@[Planta(vegetal)]
| 2) [es][n]@[Planta(NA)]
| (Press Enter to select none)
>>
| Do you want to create this node? [Y/N] : y
| Enter <lang> <type> <lemma> in this format:
> es n architecture
| Node created.
| Successfully binded 'Planta'.
>> Planta
| Did you mean...
| 1) [es][j]@[Planta(vegetal)]
| 2) [es][n]@[Planta(NA)]
| 3) [es][n]@[Planta(architecture)]
| (Press Enter to select none)
>> 3
| The node was already present.
>> Bicho
| Successfully binded 'Bicho'.
>>
(SYS: Ended edit-session at 16:49:35)
16:49:10 ~ [es][n]@[Piso(NA)]/[y1]:
Using commands like y0, y1, y2, e0, e1, or e2 in this system not only displays the contents of specific fields but also sets these fields as the general working field for the SKCLI. This dual functionality allows for both viewing and dynamically specifying the active field for subsequent operations within the CLI environment.
The do_cp and do_mv functions are tailored for node management within a graph, specifically for copying and moving nodes between nodes AND/OR fields.
do_cp creates new connections (bindings) between nodes and specified fields, effectively duplicating their associations.
do_mv not only binds nodes to new fields, mimicking the copy action, but also removes (unbinds) their connections from the original fields, truly moving the nodes within the graph's structure.
Arguments
Either name (single) or field(s) net to be specified, while indexes are merely optional; if not provided, the function will select the whole set of connections. Also, these functions support index ranging (v.g. 5-8 instead of 5 6 7 8).
cp/mv 1 5 10-15 Bicho palo y0 y1 # user provided name and fields
cp/mv 1 5 10-15 y0 y1 # placeholder node is selected
cp/mv 1 5 10-15 Bicho palo # placeholder field is selected
Given a set of connections displayed within a LS_Interface , independently from the placeholder fielding, this functions takes a subset and connects everyting, either through synset1 or semset1.
19:55:12 ~ [es][n]@[Colegio(NA)]/[y1]: ls
(SYS: Started edit-session at 19:55:20)
Showing 5/5 results.
| 1. Alumnado | 3. Escuela | 5. Instituto
| 2. CorporaciΓ³n | 4. Facultad
>> cross 1-3 e
Nodes successfully binded with e1 relationship.
>>
(SYS: Ended edit-session at 19:55:37)
19:55:12 ~ [es][n]@[Colegio(NA)]/[y1]: cd Alumnado
19:55:54 ~ [es][n]@[Alumnado(NA)]/[y1]: ls e1
(SYS: Started edit-session at 19:56:00)
Showing 5/5 results.
| 1. Beca de educaciΓ³n | 3. Escuela | 5. Profesor
| 2. CorporaciΓ³n | 4. PedagΓ³gico
>>
The do_align function is utilized for equalizing nodes connections based on the fields and index ranges of interest.
Index Ranges: alongside fields, you can specify indices or ranges of indices (e.g., 2, 4-7) to select specific nodes from self.listed_nodes for alignment. The function expands these ranges to include all indices within them.
Placeholder Inclusion: if only one node is selected (i.e., the argument leads to a single index), the function understand that the alignment must be done between the placeholder node and the inserted one.
Fields Specification [opt] : You can specify one or more fields from a predefined list ('y0', 'y1', 'y2', 'e0', 'e1', 'e2') to indicate which attributes of the nodes should be considered for alignment, or even the global codes 'e' and 'y'. If no fields are specified, all of them are considered (global alignment).
This process ensures that all target_nodes share the same bindings in their respective fields, facilitating data alignment across the graph.
This command, used also within the GB_Interface and the SKCLI, allows to grab different indexes directly from the ls display of nodes. The grab function supports index ranging.
VG_Interface is a conceptual tool rather than a formal class interface in our system. It functions as a code stratagem through the input in PrimaryInterface to emulate an interface. This approach is chosen due to its simplicity, which doesn't justify the effort of programming an auxiliary Command Line Interface (CLI).
The VG_Interface primarily allows for the addition of examples simply by typing them directly into the prompt. Additionally, it supports the removal of these examples using the 'del' command. Beyond these functionalities, the VG_Interface does not offer further complexity or features. This design choice keeps the interface straightforward and user-friendly, focusing on essential tasks without overcomplicating the user experience.
20:49:49 ~ [es][v]@[Postular(NA)]/[y1]: vg
(SYS: Started vg-session at 20:49:57)
| Showing 1 example(s):
| 0) No poseer ese ΓΊltimo momento con una persona cercana, prΓ‘cticamente perder el pasado, es postulado brillantemente como una nueva fuente de trauma.
>> This is a mock example line.
| Added the last example.
>>
(SYS: Ended vg-session at 20:50:10)
20:49:49 ~ [es][v]@[Postular(NA)]/[y1]: vg
(SYS: Started vg-session at 20:50:11)
| Showing 2 example(s):
| 0) No poseer ese ΓΊltimo momento con una persona cercana, prΓ‘cticamente perder el pasado, es postulado brillantemente como una nueva fuente de trauma.
| 1) This is a mock example line.
>> del 1
| Removed 1 example(s).
>>
(SYS: Ended vg-session at 20:50:38)
20:49:49 ~ [es][v]@[Postular(NA)]/[y1]: vg
(SYS: Started vg-session at 20:50:39)
| Showing 2 example(s):
| 0) No poseer ese ΓΊltimo momento con una persona cercana, prΓ‘cticamente perder el pasado, es postulado brillantemente como una nueva fuente de trauma.
>>
(SYS: Ended vg-session at 20:50:38)
3. GB_Interface
The method of grabbing nodes is primarily explained in the Primary Interface, although there are additional ways to grab nodes directly from within the GB Interface itself.
The GB_Interface (Grabbed Nodes Interface) is designed for managing nodes that are specifically marked for use in searches. It's a specialized environment within the command-line interface, activated by using the command grabbed.
19:42:40 ~ [es][n]@[LecciΓ³n(NA)]/[y1]: grabbed
(SYS: Started edit-session at 19:44:58)
No nodes grabbed yet.
>>
Brief reminder about the Centrality Algorithm
High centrality scores may not always imply strong cohesion within a single group; they can also indicate nodes bridging disparate groups with weak or dispersed connections. Understanding network context is crucial for accurate interpretation.
Now, let's explore the key methods of the GB Interface:
Reinvokes the display function to show the current grabbed nodes, providing an updated view of the grabbed nodes list. One of the key aspects of this command is that the centralities are also displayed and represented (calculated through the Graph Serach Algorithms centrality function).
This method serves as a gateway to the do_grab method in the parent CLI, facilitating the addition of new nodes to the grabbed list. It retains the functionality of identifying and offering alternatives for potentially misspelled node names, as well as allowing for the selection of nodes with homologous names (for a detailed demonstration of these capabilities, refer to the documentation of the grab function in the <PrimaryInterface> class).
Allows for the removal of selected nodes from the grabbed list. It takes indexes of nodes to be removed, and then deletes these nodes from the grabbed_nodes list in the parent CLI.
As well as the methods at LS_Interface that require indexes as input, this function also accepts multiple index range selection in the form of 5-8 to select, indexes [5, 6, 7, 8].