Interface QueryResultBuilder<T>

  • Type Parameters:
    T - the type of original source content (String or TextFragment)
    All Known Implementing Classes:
    FragmentQueryResultBuilder, TextQueryResultBuilder

    public interface QueryResultBuilder<T>
    Interface for building QueryResult objects from translation responses.
    • Method Detail

      • convertResponses

        List<net.sf.okapi.common.query.QueryResult> convertResponses​(List<TranslationResponse> responses,
                                                                     T originalSource)
        Convert translation responses to QueryResult objects.
        Parameters:
        responses - the translation responses
        originalSource - the original source content
        Returns:
        list of QueryResult objects
      • createDummyResponse

        net.sf.okapi.common.query.QueryResult createDummyResponse​(T originalSource)
        Create a dummy response when translation fails. Returns the source text as the translation.
        Parameters:
        originalSource - the original source content
        Returns:
        a dummy QueryResult