コード例 #1
0
ファイル: align.py プロジェクト: anushabala/deepdialog
def get_event_sequence(action_str, seq_type, bitmap_dim):
        if seq_type == "absolute":
            event_sequence = AbsoluteEventSequence.from_string(action_str)
        elif seq_type == "cursor":
            relative_sequence = RelativeEventSequence.from_eval_str(action_str)
            abs_sequence = AbsoluteEventSequence.from_relative(relative_sequence, bitmap_dim, bitmap_dim)
            event_sequence = CursorEventSequence.from_absolute(abs_sequence)
        else:
            event_sequence = RelativeEventSequence.from_eval_str(action_str)
        return event_sequence.events
コード例 #2
0
ファイル: align.py プロジェクト: mihail911/deepdialog
def get_event_sequence(action_str, seq_type, bitmap_dim):
    if seq_type == "absolute":
        event_sequence = AbsoluteEventSequence.from_string(action_str)
    elif seq_type == "cursor":
        relative_sequence = RelativeEventSequence.from_eval_str(action_str)
        abs_sequence = AbsoluteEventSequence.from_relative(
            relative_sequence, bitmap_dim, bitmap_dim)
        event_sequence = CursorEventSequence.from_absolute(abs_sequence)
    else:
        event_sequence = RelativeEventSequence.from_eval_str(action_str)
    return event_sequence.events