#!/usr/bin/env python # coding: utf-8 # # Values frequency for selected features # In[1]: # Loading the Text-Fabric code # Note: it is assumed Text-Fabric is installed in your environment from tf.fabric import Fabric from tf.app import use # In[2]: # load the N1904 app and data N1904 = use ("tonyjurg/Nestle1904LFT", version="0.6", hoist=globals()) # In[3]: FeatureList=('bookshort','wgrole','wgtype', 'wgrole', 'degree','gn','junction','mood','nu','person','wgrule') for Feature in FeatureList: if Feature=='otype': break # this feature needs to be skipped. print ('Feature:',Feature,'\n\n\t value\t frequency') FeatureFrequenceLists=Fs(Feature).freqList() for item, freq in FeatureFrequenceLists: print ('\t',item,'\t',freq) print ('\n') # In[ ]: # In[ ]: ## Value list of selected features