Skip to content

Commit 010a955

Browse files
committed
Add some more doc to the new Ssurgeon CombineMWT operation
1 parent e5cad73 commit 010a955

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/CombineMWT.java

+12
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@
1111
import edu.stanford.nlp.semgraph.semgrex.SemgrexMatcher;
1212
import edu.stanford.nlp.util.StringUtils;
1313

14+
15+
/**
16+
* Combines two or more words into one MWT
17+
*<br>
18+
* For the most part, the nodes themselves are unchanged, but the
19+
* nodes now have the CoreAnnotations representing MWTness added
20+
*<br>
21+
* This is a convenience operation which exists because the basic
22+
* version of it using EditNode is a bit of a pain
23+
*
24+
* @author John Bauer
25+
*/
1426
public class CombineMWT extends SsurgeonEdit {
1527
public static final String LABEL = "combineMWT";
1628
final List<String> names;

src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java

+4
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@
132132
* {@code -node} is the node to edit.
133133
* {@code ...attributes...} are the attributes to change, same as with {@code addDep}
134134
*</p><p>
135+
* {@code combineMWT} will add MWT attributes to a sequence of two or more words.
136+
* {@code -node} (repeated) is the nodes to edit.
137+
* {@code -word} is the optional text to use for the new MWT. If not set, the words will be concatenated.
138+
*</p><p>
135139
* {@code setRoots} sets the roots of the sentence to a new root.
136140
* {@code n1, n2, ...} are the names of the nodes from the Semgrex to use as the root(s).
137141
* This is best done in conjunction with other operations which actually manipulate the structure

0 commit comments

Comments
 (0)