public override List DecodeChain()

in Runtime/Tokenizers/Decoders/Decoders.cs [169:182]


        public override List<string> DecodeChain(List<string> tokens)
        {
            string pattern = Utils.createPattern(this.Config["pattern"]);

            if (pattern == null)
            {
                return tokens;
            }

            // Iterate through each token in tokens array. Replacing all occurences of specified pattern
            // with the content defined the configuration and returning a new array with modified tokens.
            // We use LINQ's Select method to transform each element of the tokens list.
            return tokens.Select(token => token.Replace(pattern, this.Config["content"].Value<string>())).ToList();
        }