コード例 #1
0
        public void TrainSegment(IReadOnlyList <string> sourceSegment,
                                 IReadOnlyList <string> targetSegment)
        {
            CheckDisposed();

            SmtEngine.TrainSegment(sourceSegment, targetSegment);
        }
コード例 #2
0
        public WordAlignmentMatrix TrainSegment(IReadOnlyList <string> sourceSegment,
                                                IReadOnlyList <string> targetSegment)
        {
            CheckDisposed();

            TranslationResult ruleResult = RuleEngine?.Translate(sourceSegment);

            WordAlignmentMatrix matrix = GetHintMatrix(sourceSegment, targetSegment, ruleResult);

            SmtEngine.TrainSegment(sourceSegment, targetSegment, matrix);
            return(matrix);
        }