Skip to content

Commit a11257e

Browse files
committed
auto punctuation
1 parent fe6ed0c commit a11257e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

notatrix/src/nx/base-token.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ class BaseToken extends NxBaseClass {
5858
if (typeof deprel !== "string" && deprel != null)
5959
throw new NxError("deprel must be a string, null, or undefined");
6060

61+
if(this.upostag == "PUNCT" && deprel == null)
62+
deprel = "punct";
63+
6164
// if we're not enhanced, only can have 1 head at a time
6265
if (!this.sent.options.enhanced)
6366
this.heads.clear();

0 commit comments

Comments
 (0)