1. Hiroyoshi Komatsu
  2. corenlp-python

Commits

dustin smith  committed 66bee40

isdigit bug

  • Participants
  • Parent commits e9adaad
  • Branches master

Comments (0)

Files changed (1)

File server.py

View file
  • Ignore whitespace
                 # make [ignore,ignore,a,b,c,d] into [[a,b],[c,d]]
                 av = zip(*[av[2:][x::2] for x in (0, 1)]) 
                 # save as attr-value dict, convert numbers into ints
-                tmp['words'][av[1]] = dict(map(lambda x: (x[0], x[1].isdigit()
-                    and int(x[1]) or x[1]), av))
+                tmp['words'][av[1]] = dict(map(lambda x: (x[0], x[1].isdigit() and int(x[1]) or x[1]), av))
             state = 3
         elif state == 3:
             # skip over parse tree