Documentation of 'smile.nlp.dictionary.SimpleDictionary' Java class
SimpleDictionary
smile.nlp.dictionary

Class SimpleDictionary

  • All Implemented Interfaces:
    Dictionary


    public class SimpleDictionary
    extends java.lang.Object
    implements Dictionary
    A simple implementation of dictionary interface.
    • Constructor Summary

      Constructors 
      Constructor and Description
      SimpleDictionary(java.lang.String resource)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean contains(java.lang.String word)
      Returns true if this dictionary contains the specified word.
      java.util.Iterator<java.lang.String> iterator()
      Returns an iterator over the elements in this dictionary.
      int size()
      Returns the number of elements in this dictionary.
      • Methods inherited from class java.lang.Object

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

      • SimpleDictionary

        public SimpleDictionary(java.lang.String resource)
        Constructor.
        Parameters:
        resource - the file name of dictionary. The file should be in plain text, in which each line is a word.
    • Method Detail

      • contains

        public boolean contains(java.lang.String word)
        Description copied from interface: Dictionary
        Returns true if this dictionary contains the specified word.
        Specified by:
        contains in interface Dictionary
      • size

        public int size()
        Description copied from interface: Dictionary
        Returns the number of elements in this dictionary.
        Specified by:
        size in interface Dictionary
      • iterator

        public java.util.Iterator<java.lang.String> iterator()
        Description copied from interface: Dictionary
        Returns an iterator over the elements in this dictionary.
        Specified by:
        iterator in interface Dictionary

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.