Class AutoTagPlugin

    • Field Detail

      • LANG_FRENCH

        public static final int LANG_FRENCH
        Deprecated.
        Identifier for the French language.
        See Also:
        Constant Field Values
      • LANG_ENGLISH

        public static final int LANG_ENGLISH
        Deprecated.
        Identifier for the English language.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AutoTagPlugin

        public AutoTagPlugin​(String name,
                             String className,
                             XWikiContext context)
        Deprecated.
        The mandatory plugin constructor, this is the method called (through reflection) by the plugin manager.
        Parameters:
        name - the plugin name, usually ignored, since plugins have a fixed name
        className - the name of this class, ignored
        context - the current request context
    • Method Detail

      • generateTagCloud

        public TagCloud generateTagCloud​(String text,
                                         int lang)
        Deprecated.
        Analyze a piece of text, and extract the most common words into a "tag cloud". In detail, this splits the text into tokens, counts how many times each token appears in the text, removes the "stop-words", joins together words from the same root (stemming), and prepares an HTML tag cloud which can be printed in the response.
        Parameters:
        text - the text to analyze
        lang - the language in which the text is written, 0 for French or 1 for English
        Returns:
        the resulting TagCloud with all the analyzed data, including the HTML tag cloud
      • countWords

        public TagCloud countWords​(String text,
                                   int lang)
        Deprecated.
        Analyze a piece of text, splitting it into individual words, along with their frequencies. In detail, this splits the text into tokens, counts how many times each token appears in the text, removes the "stop-words", and joins together words from the same root (stemming). generateTagCloud(String, int) also prepares an HTML tag cloud which can be printed in the response.
        Parameters:
        text - the text to analyze
        lang - the language, 0 for French or 1 for English
        Returns:
        the resulting TagCloud with all the analyzed data, except the HTML tag cloud
      • sortSet

        public static <T extends Comparable<T>> SortedSet<T> sortSet​(Set<T> oSet)
        Deprecated.
        Return a sorted copy of a set.
        Type Parameters:
        T - the type of the items in the set
        Parameters:
        oSet - the set containing the values to sort; it is not affected in any way by this method
        Returns:
        a new sorted set containing all the values in the input set
      • sortMap

        public static <K,​V> Map<K,​V> sortMap​(Map<K,​V> hmap)
        Deprecated.
        Return a copy of a map, sorted in ascending order of their values.
        Type Parameters:
        K - the type of the map keys
        V - the type of the map values
        Parameters:
        hmap - the map containing the entries to sort; it is not affected in any way by this method
        Returns:
        a new sorted map containing all the entries in the input map
      • getLanguageConstant

        public int getLanguageConstant​(String lang)
        Deprecated.
        Get the identifier corresponding to the given two-leter country code. Currently the only supported values are "en" and "fr".
        Parameters:
        lang - the two-letter ISO 3166-1 alpha-2 code of a country
        Returns:
        0 for French ("fr") or 1 for English ("en") and all other passed values