public class TextRank extends Object implements Callable<Collection<MetricVector>>
| Modifier and Type | Field and Description |
|---|---|
protected long |
elapsed_time |
protected Graph |
graph |
protected LanguageModel |
lang
Protected members.
|
static int |
MAX_NGRAM_LENGTH |
static long |
MAX_WORDNET_GRAPH |
static long |
MAX_WORDNET_TEXT |
protected Map<NGram,MetricVector> |
metric_space |
static double |
MIN_NORMALIZED_RANK |
protected Graph |
ngram_subgraph |
static String |
NLP_RESOURCES
Public definitions.
|
protected long |
start_time |
protected String |
text |
protected boolean |
use_wordnet |
| Constructor and Description |
|---|
TextRank(String res_path,
String lang_code)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<MetricVector> |
call()
Run the TextRank algorithm on the given semi-structured text
(e.g., results of parsed HTML from crawled web content) to
build a graph of weighted key phrases.
|
Graph |
getGraph()
Accessor for the graph.
|
void |
prepCall(String text,
boolean use_wordnet)
Prepare to call algorithm with a new text to analyze.
|
String |
toString()
Serialize resulting graph to a string.
|
public static final String NLP_RESOURCES
public static final double MIN_NORMALIZED_RANK
public static final int MAX_NGRAM_LENGTH
public static final long MAX_WORDNET_TEXT
public static final long MAX_WORDNET_GRAPH
protected final LanguageModel lang
protected String text
protected boolean use_wordnet
protected Graph graph
protected Graph ngram_subgraph
protected Map<NGram,MetricVector> metric_space
protected long start_time
protected long elapsed_time
public void prepCall(String text, boolean use_wordnet)
public Collection<MetricVector> call()
call in interface Callable<Collection<MetricVector>>public Graph getGraph()
Copyright © 2017. All rights reserved.