Package edu.stanford.nlp.web

Examples of edu.stanford.nlp.web.HTMLParser


  public List<Word> getWordsFromHTML(String fileOrURL) throws IOException {
    return getWordsFromHTML(fileOrURLToReader(fileOrURL));
  }

  public List<Word> getWordsFromHTML(Reader input) {
    HTMLParser parser = new HTMLParser();
    try {
      String s = parser.parse(input);
      return getWordsFromText(new StringReader(s));
    } catch (IOException e) {
      System.err.println("IOException" + e.getMessage());
    }
    return null;
View Full Code Here


  public List<List<? extends HasWord>> getSentencesFromHTML(String fileOrURL) throws IOException {
    return getSentencesFromHTML(fileOrURLToReader(fileOrURL));
  }

  public List<List<? extends HasWord>> getSentencesFromHTML(Reader input) {
    HTMLParser parser = new HTMLParser();
    try {
      String s = parser.parse(input);
      return getSentencesFromText(new StringReader(s));
    } catch (IOException e) {
      System.err.println("IOException" + e.getMessage());
    }
    return null;
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.web.HTMLParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.