Ignore:
Timestamp:
29/11/07 11:03:23 (12 years ago)
Author:
lawrence
Message:

Support for synonyms in semantic search

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/discovery.py

    r3069 r3070  
    295295        vs=VS(proxyServer=self.cf.get('DEFAULT','proxyServer')) 
    296296        if 'searchString' in self.inputs: 
    297             [broader,narrower]=vs.getRelated(self.inputs['searchString']) 
    298             c.narrower=narrower 
    299             c.broader=broader 
     297            [broader,narrower,synonyms]=vs.getRelated(self.inputs['searchString']) 
    300298            #get a base string for the links to new searches 
    301299            if 'start' in self.inputs: del self.inputs['start'] 
     
    308306            c.narrower=[] 
    309307            c.broader=[] 
     308            c.synonyms=[] 
    310309            for i in narrower: 
    311310                c.narrower.append((i,url.replace('###SEARCHSSTRING###',i))) 
    312311            for i in broader: 
    313312                c.broader.append((i,url.replace('###SEARCHSSTRING###',i))) 
     313            for i in synonyms: 
     314                c.synonyms.append((i,url.replace('###SEARCHSSTRING###',i))) 
     315            if c.narrower!=[] or c.broader!=[] or c.synonyms!=[]: c.semAvailable=1 
    314316        else: 
    315             broader,narrower=[],[] 
     317            broader,narrower,synonyms=[],[],[] 
     318            c.semAvailable=0 
    316319         
    317320        return render_response('semantic',fragment=True) 
Note: See TracChangeset for help on using the changeset viewer.