Class RakeAlgorithm

    • Constructor Detail

      • RakeAlgorithm

        public RakeAlgorithm​(RakeParams rakeParams,
                             String taggerModelUrl,
                             String sentDectModelUrl)
                      throws IOException
        Constructor.
        Parameters:
        rakeParams - the parameters RAKE will use
        taggerModelUrl - the URL of the trained POS tagging model
        sentDectModelUrl - the URL of the trained sentence detection model
        Throws:
        IOException - if either of the URLs are invalid
        See Also:
        RakeParams
      • RakeAlgorithm

        public RakeAlgorithm​(RakeParams rakeParams,
                             InputStream taggerStream,
                             InputStream sentDectStream)
                      throws IOException
        Constructor.
        Parameters:
        rakeParams - the parameters RAKE will use
        taggerStream - the input stream of the POS tagging model
        sentDectStream - the input stream of the sentence detection model
        Throws:
        IOException - if either of the input streams are invalid
        See Also:
        RakeParams
    • Method Detail

      • rake

        public Result rake​(String txtEl)
        Run RAKE on a single string.
        Parameters:
        txtEl - a string with the text that you want to run RAKE on
        Returns:
        a data object containing the results of RAKE
        See Also:
        Result
      • getResult

        public Result getResult​(ArrayList<Keyword> keywords)
        Convert a list of keywords to a Result.
        Parameters:
        keywords - a list of extracted keywords
        Returns:
        a data object containing the results of RAKE
        See Also:
        Keyword, Result