Class Index


  • public class Index
    extends Object
    Author:
    Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de)
    • Constructor Detail

      • Index

        public Index()
      • Index

        public Index​(int _q)
        Constructor for similarities others than trigrams
        Parameters:
        _q - value of n for n-grams
    • Method Detail

      • addString

        public Set<String> addString​(String s)
        Tokenizes a string and adds it to the index
        Parameters:
        s - String to index
        Returns:
        The number of tokens generated for s
      • getStrings

        public Set<String> getStrings​(int size,
                                      String token)
        Returns all strings to a given token
        Parameters:
        size - , Size of token
        token - Input token
        Returns:
        All strings that contain this token
      • getStrings

        public Map<String,​Set<String>> getStrings​(int size)
        Returns all strings of size size
        Parameters:
        size - Size requirement
        Returns:
        All strings which consist of "size" different tokens