MSTParser.DependencyPipe.CreateFeatureVector C# (CSharp) Method

CreateFeatureVector() public method

public CreateFeatureVector ( string toks, string pos, string labs, int deps ) : FeatureVector
toks string
pos string
labs string
deps int
return FeatureVector
        public virtual FeatureVector CreateFeatureVector(string[] toks,
                                                 string[] pos,
                                                 string[] labs,
                                                 int[] deps)
        {
            var posA = new string[pos.Length];
            for (int i = 0; i < pos.Length; i++)
            {
                posA[i] = pos[i].SubstringWithIndex(0, 1);
            }

            var fv = new FeatureVector();
            for (int i = 0; i < toks.Length; i++)
            {
                if (deps[i] == -1)
                    continue;
                int small = i < deps[i] ? i : deps[i];
                int large = i > deps[i] ? i : deps[i];
                bool attR = i < deps[i] ? false : true;
                fv = CreateFeatureVector(toks, pos, posA, small, large, attR, fv);
                if (Labeled)
                {
                    fv = CreateFeatureVector(toks, pos, posA, i, labs[i], attR, true, fv);
                    fv = CreateFeatureVector(toks, pos, posA, deps[i], labs[i], attR, false, fv);
                }
            }
            return fv;
        }

Same methods

DependencyPipe::CreateFeatureVector ( string toks, string pos, string posA, int small, int large, bool attR, FeatureVector fv ) : FeatureVector
DependencyPipe::CreateFeatureVector ( string toks, string pos, string posA, int word, string type, bool attR, bool childFeatures, FeatureVector fv ) : FeatureVector