Package org.nlpub.watset.util
Class ABCFormat
- java.lang.Object
-
- org.nlpub.watset.util.ABCFormat
-
public final class ABCFormat extends Object
Utilities for handling the ABC(source, target, weight)edge list format.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.jgrapht.Graph<String,org.jgrapht.graph.DefaultWeightedEdge>parse(Stream<String> stream)Parse the string stream of ABC-formatted edges.static org.jgrapht.Graph<String,org.jgrapht.graph.DefaultWeightedEdge>parse(Stream<String> stream, String regex)Parse the string stream of ABC-formatted edges.
-
-
-
Field Detail
-
SEPARATOR
public static final String SEPARATOR
The default separator, expressed by the tab symbol.- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public static org.jgrapht.Graph<String,org.jgrapht.graph.DefaultWeightedEdge> parse(Stream<String> stream, String regex)
Parse the string stream of ABC-formatted edges.- Parameters:
stream- the input streamregex- the separator regular expression- Returns:
- the graph represented in the stream
-
-