public SyntacticCategory assignFeatures ( Map < Integer , String > assignedFeatures , Map < Integer , Integer > relabeledFeatures ) { String newFeatureValue = featureValue ; int newFeatureVariable = featureVariable ; if ( assignedFeatures . containsKey ( featureVariable ) ) { newFeatureValue = assignedFeatures . get ( featureVariable ) ; newFeatureVariable = - 1 ; } else if ( relabeledFeatures . containsKey ( featureVariable ) ) { newFeatureVariable = relabeledFeatures . get ( newFeatureVariable ) ; } if ( isAtomic ( ) ) { return SyntacticCategory . createAtomic ( value , newFeatureValue , newFeatureVariable ) ; } else { SyntacticCategory assignedReturn = returnType . assignFeatures ( assignedFeatures , relabeledFeatures ) ; SyntacticCategory assignedArgument = argumentType . assignFeatures ( assignedFeatures , relabeledFeatures ) ; return SyntacticCategory . createFunctional ( direction , assignedReturn , assignedArgument , newFeatureValue , newFeatureVariable ) ; } }
Assigns values to or relabels feature variables in this category .