# Path: visualize.py
# SCRIPTDIR=os.path.dirname(os.path.abspath(__file__))
# def read_conll(inp,maxsent):
# def sort_feat(f):
# def get_col(cols,idx):
# def visualize(args):


import codecs
import sys
import os
    import argparse
    import compat.argparse as argparse
from collections import defaultdict
from visualize import read_conll,sort_feat,header,footer


try:
except ImportError:

SCRIPTDIR=os.path.dirname(os.path.abspath(__file__))

#         0  1    2     3       4  5    6    7      8    9     10     11
#conll-u  ID FORM LEMMA CPOS   POS FEAT HEAD DEPREL DEPS MISC
#conll-09 ID FORM LEMMA PLEMMA POS PPOS FEAT PFEAT  HEAD PHEAD DEPREL PDEPREL _ _
def visualize_clauses(args):
    data_to_print=u""
    count=1
    for sent,comments in read_conll(args.input,args.max_sent):
        d=defaultdict(lambda:[])
        for line in sent:
            if len(line)==10: #conll-u
                line[5]=sort_feat(line[5])
                l=line
                idx=line[9]
            else: #conll-09

# Path: visualize.py
# SCRIPTDIR=os.path.dirname(os.path.abspath(__file__))
# def read_conll(inp,maxsent):
# def sort_feat(f):
# def get_col(cols,idx):
# def visualize(args):


# Path: visualize_clauses.py
import codecs
import sys
import os
    import argparse
    import compat.argparse as argparse
from collections import defaultdict
from visualize import read_conll,sort_feat,header,footer



try:
except ImportError:

SCRIPTDIR=os.path.dirname(os.path.abspath(__file__))

#         0  1    2     3       4  5    6    7      8    9     10     11
#conll-u  ID FORM LEMMA CPOS   POS FEAT HEAD DEPREL DEPS MISC
#conll-09 ID FORM LEMMA PLEMMA POS PPOS FEAT PFEAT  HEAD PHEAD DEPREL PDEPREL _ _
def visualize_clauses(args):
    data_to_print=u""
    count=1
    for sent,comments in read_conll(args.input,args.max_sent):
        d=defaultdict(lambda:[])
        for line in sent:
            if len(line)==10: #conll-u
                line[5]=sort_feat(line[5])
                l=line
                idx=line[9]
            else: #conll-09

                line[6]=sort_feat(line[6])