Class Vocabulary


  • public class Vocabulary
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String vocName  
    • Constructor Summary

      Constructors 
      Constructor Description
      Vocabulary​(java.io.File cache)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String[] nwv)  
      void addAll​(java.lang.String s)  
      static java.util.List<java.lang.String> didYouMean​(int count, java.lang.Iterable<java.lang.String> posibilities, java.lang.String queryString)  
      java.util.List<java.lang.String> didYouMean​(int count, java.lang.String queryString)  
      java.util.List<java.lang.String> didYouMean​(int count, java.lang.String... queryStrings)
      this one takes ALL querySAtrings, put them to ALL lists, then sort and take best of EACH
      java.util.List<java.lang.String> didYouMeanORIG​(int count, java.lang.String... queryStrings)
      this one takes ALL querySAtrings, put them to ONE list, then sort and take best of ALL
      java.io.File getFile()  
      boolean isEmpty()  
      void laodVocs()  
      void saveVocs()  
      int size()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Vocabulary

        public Vocabulary​(java.io.File cache)
    • Method Detail

      • getFile

        public java.io.File getFile()
      • add

        public void add​(java.lang.String[] nwv)
      • saveVocs

        public void saveVocs()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • laodVocs

        public void laodVocs()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • didYouMeanORIG

        public java.util.List<java.lang.String> didYouMeanORIG​(int count,
                                                               java.lang.String... queryStrings)
        this one takes ALL querySAtrings, put them to ONE list, then sort and take best of ALL
        Parameters:
        count -
        queryStrings -
        Returns:
      • didYouMean

        public java.util.List<java.lang.String> didYouMean​(int count,
                                                           java.lang.String... queryStrings)
        this one takes ALL querySAtrings, put them to ALL lists, then sort and take best of EACH
        Parameters:
        count -
        queryStrings -
        Returns:
      • didYouMean

        public java.util.List<java.lang.String> didYouMean​(int count,
                                                           java.lang.String queryString)
      • didYouMean

        public static java.util.List<java.lang.String> didYouMean​(int count,
                                                                  java.lang.Iterable<java.lang.String> posibilities,
                                                                  java.lang.String queryString)
      • isEmpty

        public boolean isEmpty()
      • size

        public int size()
      • addAll

        public void addAll​(java.lang.String s)