Package smile.nlp

Interface AnchorText

All Known Implementing Classes:
SimpleText

public interface AnchorText
The anchor text is the visible, clickable text in a hyperlink. This provides an interface to all the anchor text in the corpus pointing to a text.
  • Method Details

    • getAnchor

      String getAnchor()
      Returns the anchor text if any. The anchor text is the visible, clickable text in a hyperlink. The anchor text is all the anchor text in the corpus pointing to this text.
      Returns:
      the anchor text.
    • setAnchor

      AnchorText setAnchor(String anchor)
      Sets the anchor text. Note that anchor is all link labels in the corpus pointing to this text. So addAnchor is more appropriate in most cases.
      Parameters:
      anchor - the anchor text.
      Returns:
      this object.
    • addAnchor

      AnchorText addAnchor(String linkLabel)
      Adds a link label to the anchor text.
      Parameters:
      linkLabel - the link label.
      Returns:
      this object.