Class SubsequentialTransducers

    • Method Detail

      • toOnwardSST

        public static <S1,​S2,​I,​T1,​T2,​O,​A extends MutableSubsequentialTransducer<S2,​I,​T2,​O>> A toOnwardSST​(SubsequentialTransducer<S1,​I,​T1,​O> sst,
                                                                                                                                                                Collection<? extends I> inputs,
                                                                                                                                                                A out)
        Constructs a new onward subsequential transducer for a given SST. In an onward SST, for each state except the initial state, the longest common prefix over the state output and the outputs of all outgoing transitions of a state is epsilon. This can be achieved by pushing back the longest common prefix to the transition outputs of the incoming transitions of each state.
        Parameters:
        sst - the original SST
        inputs - the alphabet symbols to consider for this transformation
        out - the target automaton to write the onward form to
        Returns:
        out, for convenience
      • toOnwardSST

        public static <S1,​S2,​I,​T1,​T2,​O,​A extends MutableSubsequentialTransducer<S2,​I,​T2,​O>> A toOnwardSST​(SubsequentialTransducer<S1,​I,​T1,​O> sst,
                                                                                                                                                                Collection<? extends I> inputs,
                                                                                                                                                                A out,
                                                                                                                                                                boolean minimize)
        Constructs a new onward subsequential transducer for a given SST. In an onward SST, for each state except the initial state, the longest common prefix over the state output and the outputs of all outgoing transitions of a state is epsilon. This can be achieved by pushing back the longest common prefix to the transition outputs of the incoming transitions of each state.
        Parameters:
        sst - the original SST
        inputs - the alphabet symbols to consider for this transformation
        out - the target automaton to write the onward form to
        minimize - a flag indicating whether the final result should be minimized
        Returns:
        out, for convenience
      • isOnwardSST

        public static <S,​I,​T,​O> boolean isOnwardSST​(SubsequentialTransducer<S,​I,​T,​O> sst,
                                                                      Collection<? extends I> inputs)
        Checks whether a given SubsequentialTransducer is onward, i.e. if for each state (sans initial state) the longest common prefix over its state property and the transition properties of its outgoing edges equals epsilon.
        Parameters:
        sst - the SST to check
        inputs - the input symbols to consider for this check
        Returns:
        true if sst is onward, false otherwise