Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

move dictionary zipping code out of T to make it more flexible

  • Loading branch information...
commit 2de338ed94f5d34277988a4d9f4e138ed010ec39 1 parent 65e5c47
@jtauber authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 qmorph.py
View
6 qmorph.py
@@ -2,14 +2,14 @@
class T:
- def __init__(self, label, data):
- self.__dict__.update(dict(zip(label, data)))
+ def __init__(self, data_dict):
+ self.__dict__.update(data_dict)
def parse(filename, field_tuple):
for line in open(filename):
s = line.strip().split()
- yield T(field_tuple, s)
+ yield T(dict(zip(field_tuple, s)))
def process(source, queries):
Please sign in to comment.
Something went wrong with that request. Please try again.