Interface GlobalSuffixLearner<M,​I,​D>

    • Method Detail

      • getGlobalSuffixes

        Collection<Word<I>> getGlobalSuffixes()
        Retrieves the global suffixes of this learner. Calling this method before LearningAlgorithm.startLearning() should return an empty collection.

        The return value should not be modified; attempting to do so may result in an UnsupportedOperationException. It is the implementation's responsibility to ensure attempted modifications do not corrupt the learner's internal state.

        the global suffixes used by this algorithm
      • addGlobalSuffixes

        boolean addGlobalSuffixes​(Collection<? extends Word<I>> globalSuffixes)
        Add the provided suffixes to the collection of global suffixes. As this method is designed to possibly trigger a refinement, it is illegal to invoke it before LearningAlgorithm.startLearning() has been called.

        The implementation may choose to (but is not required to) omit suffixes which are already present (that is, manage the global suffixes as a proper set).

        globalSuffixes - the global suffixes to add
        true if a refinement was triggered by adding the global suffixes, false otherwise.