예제 #1
0
        public int[][] ProcessNBest(Sentence sent, int nbest)
        {
            if (rnn.IsCRFTraining == false)
            {
                throw new ArgumentException("N-best result is only for RNN-CRF model.");
            }

            var seq       = Config.BuildSequence(sent);
            var predicted = rnn.DecodeNBestCRF(seq, nbest);

            return(predicted);
        }
예제 #2
0
        public int[][] ProcessNBest(Sentence sent, int nbest)
        {
            if (rnn.IsCRFTraining == false)
            {
                throw new ArgumentException("N-best result is only for RNN-CRF model.");
            }

            Sequence seq = Featurizer.ExtractFeatures(sent);

            int[][] predicted = rnn.DecodeNBestCRF(seq, nbest);

            return(predicted);
        }