Class AsrResultTag

java.lang.Object
com.vivoka.vsdk.asr.utils.AsrResultItem
com.vivoka.vsdk.asr.utils.AsrResultTag

public class AsrResultTag extends AsrResultItem
Represents a tag item that can group terminals and/or other tags.
  • Field Details

    • name

      public String name
      Name of the tag, which can identify the semantic meaning or structure (e.g. "person", "location").
    • items

      public ArrayList<AsrResultItem> items
      Nested items within this tag, forming a tree structure. Can include both terminal and tag items.
  • Constructor Details

    • AsrResultTag

      public AsrResultTag()
      Constructs an AsrResultTag object with empty values.
  • Method Details

    • getText

      public String getText()
      Get the text representation of this tag. This concatenates the orthography of all terminals and tags within this tag.
      Returns:
      A string representing the text of this tag.
    • getTags

      public ArrayList<AsrResultTag> getTags()
      Get all tags specific to this tag. This recursively collects all tags within the hierarchy of items.
      Returns:
      A list of all AsrResultTag objects found within this tag.
    • getTerminals

      public ArrayList<AsrResultTerminal> getTerminals()
      Get all terminals specific to this tag. This recursively collects all terminals within the hierarchy of items.
      Returns:
      A list of all AsrResultTerminal objects found within this tag.
    • toString

      @NonNull public String toString()
      Specified by:
      toString in class AsrResultItem