Interface IDictionary

  • All Known Implementing Classes:
    ADictionary, HashMapDictionary

    public interface IDictionary
    Common interface for Dictionary
    Author:
    lionsoul
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  IDictionary.Type  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static IDictionary.Type HASHMAP
      Segmentation type constants
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      IWord add​(int t, String key, int type)
      add a new word to the dictionary
      IWord add​(int t, String key, int fre, int type)
      add a new word to the dictionary
      IWord add​(int t, String key, int fre, int type, String[] entity)
      add a new word to the dictionary with its statistics frequency
      IWord add​(int t, String key, int type, String[] entity)
      add a new word to the dictionary
      IWord add​(int t, IWord word)
      directly add a IWord item to the dictionary
      IWord get​(int t, String key)
      return the IWord associate with the given key.
      boolean match​(int t, String key)
      loop up the dictionary, check the given key is in the dictionary or not
      void remove​(int t, String key)
      remove the mapping associate with the given key
      int size​(int t)
      return the size of the dictionary
    • Method Detail

      • match

        boolean match​(int t,
                      String key)
        loop up the dictionary, check the given key is in the dictionary or not
      • add

        IWord add​(int t,
                  IWord word)
        directly add a IWord item to the dictionary
      • add

        IWord add​(int t,
                  String key,
                  int fre,
                  int type,
                  String[] entity)
        add a new word to the dictionary with its statistics frequency
      • add

        IWord add​(int t,
                  String key,
                  int fre,
                  int type)
        add a new word to the dictionary
      • add

        IWord add​(int t,
                  String key,
                  int type)
        add a new word to the dictionary
      • add

        IWord add​(int t,
                  String key,
                  int type,
                  String[] entity)
        add a new word to the dictionary
      • get

        IWord get​(int t,
                  String key)
        return the IWord associate with the given key. if there is not mapping for the key null will be return
      • remove

        void remove​(int t,
                    String key)
        remove the mapping associate with the given key
      • size

        int size​(int t)
        return the size of the dictionary