Skip to content

Instantly share code, notes, and snippets.

@jgontrum
Created April 7, 2018 09:14
Show Gist options
  • Save jgontrum/a503cb7309470f7ea061f2aa804f2df0 to your computer and use it in GitHub Desktop.
Save jgontrum/a503cb7309470f7ea061f2aa804f2df0 to your computer and use it in GitHub Desktop.
from sys import stdin
if __name__ == '__main__':
i = 1
for line in stdin:
if not line.strip():
print()
i = 1
continue
token, pos, dep, dep_label = line.strip().split()
print("\t".join([
str(i), token, '_', pos, pos, '_', dep, dep_label, '_', '_']))
i += 1
@jgontrum
Copy link
Author

jgontrum commented Apr 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment