Beispiel #1
0
        public double GetSegmentProbability(IEnumerable <string> segment)
        {
            IntPtr nativeSegment = Thot.ConvertStringsToNativeUtf8(segment);

            try
            {
                return(Thot.langModel_getSentenceProbability(_handle, nativeSegment));
            }
            finally
            {
                Marshal.FreeHGlobal(nativeSegment);
            }
        }