Esempio n. 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);
        }
Esempio n. 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);
        }