コード例 #1
0
        public List <LayerInfo> DivideIntoWords()
        {
            var result = new List <LayerInfo>();

            for (var i = 0; i < GetNumberOfWords(); i++)
            {
                var layerInfo = new LayerInfo();
                layerInfo.SetLayerData(ViewLayerType.TURKISH_WORD, GetTurkishWordAt(i));
                layerInfo.SetLayerData(ViewLayerType.ENGLISH_WORD, GetLayerData(ViewLayerType.ENGLISH_WORD));
                if (LayerExists(ViewLayerType.INFLECTIONAL_GROUP))
                {
                    layerInfo.SetMorphologicalAnalysis(GetMorphologicalParseAt(i));
                }

                if (LayerExists(ViewLayerType.META_MORPHEME))
                {
                    layerInfo.SetMetaMorphemes(GetMetamorphicParseAt(i));
                }

                if (LayerExists(ViewLayerType.ENGLISH_PROPBANK))
                {
                    layerInfo.SetLayerData(ViewLayerType.ENGLISH_PROPBANK,
                                           GetLayerData(ViewLayerType.ENGLISH_PROPBANK));
                }

                if (LayerExists(ViewLayerType.ENGLISH_SEMANTICS))
                {
                    layerInfo.SetLayerData(ViewLayerType.ENGLISH_SEMANTICS,
                                           GetLayerData(ViewLayerType.ENGLISH_SEMANTICS));
                }

                if (LayerExists(ViewLayerType.NER))
                {
                    layerInfo.SetLayerData(ViewLayerType.NER, GetLayerData(ViewLayerType.NER));
                }

                if (LayerExists(ViewLayerType.SEMANTICS))
                {
                    layerInfo.SetLayerData(ViewLayerType.SEMANTICS, GetSemanticAt(i));
                }

                if (LayerExists(ViewLayerType.PROPBANK))
                {
                    layerInfo.SetLayerData(ViewLayerType.PROPBANK, GetArgument().ToString());
                }

                if (LayerExists(ViewLayerType.SHALLOW_PARSE))
                {
                    layerInfo.SetLayerData(ViewLayerType.SHALLOW_PARSE, GetShallowParseAt(i));
                }

                result.Add(layerInfo);
            }

            return(result);
        }
コード例 #2
0
 public void SetDataAndClearLayers(Symbol data)
 {
     base.SetData(data);
     layers = null;
 }
コード例 #3
0
 public void ClearLayers()
 {
     layers = new LayerInfo();
 }