Commit 53b7b9ec authored by Sulfyderz's avatar Sulfyderz
Browse files

[Error Update]:Correction the append_diar method in diar.py.

parent cc88e842
......@@ -399,7 +399,20 @@ class Diar():
:param out_diarization: a diarization object
"""
self.segments += out_diarization.segments
lMatchAttr=list()
for i in self._attributes.names:
if i in out_diarization._attributes.names:
lMatchAttr.append(i)
assert len(lMatchAttr)!=0,"No attribute matches"
lSegments=list()
for i in out_diarization:
seg=Segment(self._attributes.defaults,self._attributes)
for y in lMatchAttr:
seg._set_attr(y,i[y])
lSegments.append(seg)
self.segments += lSegments
def insert(self, i, **kwargs):
"""
......@@ -1339,7 +1352,7 @@ class AttributeNames:
def __len__(self):
"""
Get the nomber of column names
Get the number of column names
:return:
"""
return self.defaults.__len__()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment