<s> """<STR_LIT>""" <EOL> from cortical . models import fingerprint <EOL> from cortical . models import term <EOL> from cortical . models import context <EOL> class ExpressionsApi ( object ) : <EOL> def __init__ ( self , apiClient ) : <EOL> self . apiClient = apiClient <EOL> def resolveExpression ( self , retina_name , body , sparsity = <NUM_LIT:1.0> ) : <EOL> """<STR_LIT>""" <EOL> resourcePath = '<STR_LIT>' <EOL> method = '<STR_LIT:POST>' <EOL> queryParams = { } <EOL> headerParams = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT:Content-Type>' : '<STR_LIT:application/json>' } <EOL> postData = None <EOL> queryParams [ '<STR_LIT>' ] = retina_name <EOL> queryParams [ '<STR_LIT>' ] = sparsity <EOL> postData = body <EOL> response = self . apiClient . _callAPI ( resourcePath , method , queryParams , postData , headerParams ) <EOL> return fingerprint . Fingerprint ( ** response . json ( ) ) <EOL> def getContextsForExpression ( self , retina_name , body , get_fingerprint = None , start_index = <NUM_LIT:0> , max_results = <NUM_LIT:5> , sparsity = <NUM_LIT:1.0> ) : <EOL> """<STR_LIT>""" <EOL> resourcePath = '<STR_LIT>' <EOL> method = '<STR_LIT:POST>' <EOL> queryParams = { } <EOL> headerParams = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT:Content-Type>' : '<STR_LIT:application/json>' } <EOL> postData = None <EOL> queryParams [ '<STR_LIT>' ] = retina_name <EOL> queryParams [ '<STR_LIT>' ] = start_index <EOL> queryParams [ '<STR_LIT>' ] = max_results <EOL> queryParams [ '<STR_LIT>' ] = sparsity <EOL> queryParams [ '<STR_LIT>' ] = get_fingerprint <EOL> postData = body <EOL> response = self . apiClient . _callAPI ( resourcePath , method , queryParams , postData , headerParams ) <EOL> return [ context . Context ( ** r ) for r in response . json ( ) ] <EOL> def getSimilarTermsForExpressionContext ( self , retina_name , body , context_id = None , pos_type = None , get_fingerprint = None , start_index = <NUM_LIT:0> , max_results = <NUM_LIT:10> , sparsity = <NUM_LIT:1.0> ) : <EOL> """<STR_LIT>""" <EOL> resourcePath = '<STR_LIT>' <EOL> method = '<STR_LIT:POST>' <EOL> queryParams = { } <EOL> headerParams = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT:Content-Type>' : '<STR_LIT:application/json>' } <EOL> postData = None <EOL> queryParams [ '<STR_LIT>' ] = retina_name <EOL> queryParams [ '<STR_LIT>' ] = context_id <EOL> queryParams [ '<STR_LIT>' ] = start_index <EOL> queryParams [ '<STR_LIT>' ] = max_results <EOL> queryParams [ '<STR_LIT>' ] = pos_type <EOL> queryParams [ '<STR_LIT>' ] = sparsity <EOL> queryParams [ '<STR_LIT>' ] = get_fingerprint <EOL> postData = body <EOL> response = self . apiClient . _callAPI ( resourcePath , method , queryParams , postData , headerParams ) <EOL> return [ term . Term ( ** r ) for r in response . json ( ) ] <EOL> def resolveBulkExpression ( self , retina_name , body , sparsity = <NUM_LIT:1.0> ) : <EOL> """<STR_LIT>""" <EOL> resourcePath = '<STR_LIT>' <EOL> method = '<STR_LIT:POST>' <EOL> queryParams = { } <EOL> headerParams = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT:Content-Type>' : '<STR_LIT:application/json>' } <EOL> postData = None <EOL> queryParams [ '<STR_LIT>' ] = retina_name <EOL> queryParams [ '<STR_LIT>' ] = sparsity <EOL> postData = body <EOL> response = self . apiClient . _callAPI ( resourcePath , method , queryParams , postData , headerParams ) <EOL> return [ fingerprint . Fingerprint ( ** r ) for r in response . json ( ) ] <EOL> def getContextsForBulkExpression ( self , retina_name , body , get_fingerprint = None , start_index = <NUM_LIT:0> , max_results = <NUM_LIT:5> , sparsity = <NUM_LIT:1.0> ) : <EOL> """<STR_LIT>""" <EOL> resourcePath = '<STR_LIT>' <EOL> method = '<STR_LIT:POST>' <EOL> queryParams = { } <EOL> headerParams = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT:Content-Type>' : '<STR_LIT:application/json>' } <EOL> postData = None <EOL> queryParams [ '<STR_LIT>' ] = retina_name <EOL> queryParams [ '<STR_LIT>' ] = start_index <EOL> queryParams [ '<STR_LIT>' ] = max_results <EOL> queryParams [ '<STR_LIT>' ] = sparsity <EOL> queryParams [ '<STR_LIT>' ] = get_fingerprint <EOL> postData = body <EOL> response = self . apiClient . _callAPI ( resourcePath , method , queryParams , postData , headerParams ) <EOL> return [ [ context . Context ( ** c ) for c in r ] for r in response . json ( ) ] <EOL> def getSimilarTermsForBulkExpressionContext ( self , retina_name , body , context_id = None , pos_type = None , get_fingerprint = None , start_index = <NUM_LIT:0> , max_results = <NUM_LIT:10> , sparsity = <NUM_LIT:1.0> ) : <EOL> """<STR_LIT>""" <EOL> resourcePath = '<STR_LIT>' <EOL> method = '<STR_LIT:POST>' <EOL> queryParams = { } <EOL> headerParams = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT:Content-Type>' : '<STR_LIT:application/json>' } <EOL> postData = None <EOL> queryParams [ '<STR_LIT>' ] = retina_name <EOL> queryParams [ '<STR_LIT>' ] = context_id <EOL> queryParams [ '<STR_LIT>' ] = start_index <EOL> queryParams [ '<STR_LIT>' ] = max_results <EOL> queryParams [ '<STR_LIT>' ] = pos_type <EOL> queryParams [ '<STR_LIT>' ] = sparsity <EOL> queryParams [ '<STR_LIT>' ] = get_fingerprint <EOL> postData = body <EOL> response = self . apiClient . _callAPI ( resourcePath , method , queryParams , postData , headerParams ) <EOL> return [ [ term . Term ( ** t ) for t in r ] for r in response . json ( ) ] </s>
