CRFSharp
CRFSharp copied to clipboard
Error in decoding
Hello, kindly help in solving the following problem i trained CRFsharp for POS task successfully but during decoding i got the below error, i will be very thankful if you kindly let me know the root cause and its possible solution. image of the error attached
"System.ArgumentOutOfRangeException' occurred in mscorlib.dll but was not handled in user code"
I'm getting similar issue using CRFSharpConsole.exe to decode and evaluate my model (model was created without any errors)
Unhandled Exception: System.AggregateException: One or more errors occurred. --->
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at CRFSharp.DecoderTagger.buildFeatures() in C:\github\CRFSharp\Core\CRFSharp\decoder\DecoderTagger.cs:line 375
at CRFSharp.DecoderTagger.parse() in C:\github\CRFSharp\Core\CRFSharp\decoder\DecoderTagger.cs:line 308
at CRFSharpWrapper.Decoder.Segment(crf_term_out[] pout, DecoderTagger tagger, List`1 inbuf) in C:\github\CRFSharp\Core\CRFSharpWrapper\Decoder.cs:line 112
at CRFSharpConsole.DecoderConsole.<>c__DisplayClass3_0.<Decode>b__0(Int32 t) in C:\github\CRFSharp\CRFSharpConsole\DecoderConsole.cs:line 188
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body)
at CRFSharpConsole.DecoderConsole.Decode(DecoderArgs options) in C:\github\CRFSharp\CRFSharpConsole\DecoderConsole.cs:line 221
at CRFSharpConsole.Program.Main(String[] args) in C:\github\CRFSharp\CRFSharpConsole\Program.cs:line 68