forked from kristjan/cjvt-valency
fixed the sentence duplication bug. todo: functors
This commit is contained in:
@@ -30,7 +30,7 @@ def frames_from_db_entry(dbent):
|
||||
],
|
||||
# sentences=[(dbent["sid"], dbent["tokens"])],
|
||||
sentences=[
|
||||
[(_full_tid(t["tid"]), t)for t in dbent["tokens"]],
|
||||
[(_full_tid(t["tid"]), t) for t in dbent["tokens"]],
|
||||
]
|
||||
)]
|
||||
return frames
|
||||
|
||||
@@ -24,12 +24,14 @@ def sorted_by_len_tids(frames):
|
||||
|
||||
def reduce_0(frames, valdb_sensemap=None):
|
||||
# new request... frames should be sorded by
|
||||
# functors list (basically reduce_1, just each
|
||||
# sentence gets its own frame)
|
||||
r1_frames = reduce_1(frames)
|
||||
# functors list
|
||||
|
||||
# return frames # simplify code...
|
||||
# frames = reduce_1(frames)
|
||||
|
||||
sorting_strings = []
|
||||
separated_frames = []
|
||||
for frame in r1_frames:
|
||||
for frame in frames:
|
||||
for tid in frame.tids:
|
||||
tmp_frame = DC(frame)
|
||||
tmp_frame.tids = [tid]
|
||||
|
||||
Reference in New Issue
Block a user