@@ -400,7 +400,7 @@ def __init__(self):
400400
401401
402402class NameTranslationParameters (_DocumentParamSetBase ):
403- """Parameter object for C{translated_name } endpoint.
403+ """Parameter object for C{name-translation } endpoint.
404404 The following values may be set by the indexing (i.e.,C{ parms["name"]}) operator. The values are all
405405 strings (when not C{None}).
406406 All are optional except C{name} and C{targetLanguage}. Scripts are in
@@ -436,7 +436,7 @@ def validate(self):
436436
437437
438438class NameMatchingParameters (_DocumentParamSetBase ):
439- """Parameter object for C{matched_name } endpoint.
439+ """Parameter object for C{name-similarity } endpoint.
440440 All are required.
441441
442442 C{name1} The name to be matched, a C{name} object.
@@ -567,9 +567,9 @@ def call(self, parameters):
567567 """Invokes the endpoint to which this L{EndpointCaller} is bound.
568568 Passes data and metadata specified by C{parameters} to the server
569569 endpoint to which this L{EndpointCaller} object is bound. For all
570- endpoints except C{translated_name } and C{matched_name }, it must be a L{DocumentParameters}
571- object or a string; for C{translated_name }, it must be an L{NameTranslationParameters} object;
572- for C{matched_name }, it must be an L{NameMatchingParameters} object. For relationships,
570+ endpoints except C{name-translation } and C{name-similarity }, it must be a L{DocumentParameters}
571+ object or a string; for C{name-translation }, it must be an L{NameTranslationParameters} object;
572+ for C{name-similarity }, it must be an L{NameMatchingParameters} object. For relationships,
573573 it may be an L(DocumentParameters) or an L(RelationshipsParameters).
574574
575575 In all cases, the result is returned as a python dictionary
@@ -579,12 +579,12 @@ def call(self, parameters):
579579 @param parameters: An object specifying the data,
580580 and possible metadata, to be processed by the endpoint. See the
581581 details for those object types.
582- @type parameters: For C{translated_name }, L{NameTranslationParameters}, otherwise L{DocumentParameters} or L{str}
582+ @type parameters: For C{name-translation }, L{NameTranslationParameters}, otherwise L{DocumentParameters} or L{str}
583583 @return: A python dictionary expressing the result of the invocation.
584584 """
585585
586586 if not isinstance (parameters , _DocumentParamSetBase ):
587- if self .suburl != "matched- name" and self .suburl != "translated- name" :
587+ if self .suburl != "name-similarity " and self .suburl != "name-translation " :
588588 text = parameters
589589 parameters = DocumentParameters ()
590590 parameters ['content' ] = text
@@ -766,21 +766,40 @@ def relationships(self, parameters):
766766 @return: A python dictionary containing the results of relationship extraction."""
767767 return EndpointCaller (self , "relationships" ).call (parameters )
768768
769- def translated_name (self , parameters ):
769+ def name_translation (self , parameters ):
770770 """
771771 Create an L{EndpointCaller} to perform name analysis and translation
772772 upon the name to which it is applied and call it.
773773 @param parameters: An object specifying the data,
774774 and possible metadata, to be processed by the name translator.
775775 @type parameters: L{NameTranslationParameters}
776776 @return: A python dictionary containing the results of name translation."""
777- return EndpointCaller (self , "translated- name" ).call (parameters )
777+ return EndpointCaller (self , "name-translation " ).call (parameters )
778778
779- def matched_name (self , parameters ):
779+ def translated_name (self , parameters ):
780+ """ deprecated
781+ Call name_translation to perform name analysis and translation
782+ upon the name to which it is applied.
783+ @param parameters: An object specifying the data,
784+ and possible metadata, to be processed by the name translator.
785+ @type parameters: L{NameTranslationParameters}
786+ @return: A python dictionary containing the results of name translation."""
787+ return self .name_translation (parameters )
788+
789+ def name_similarity (self , parameters ):
780790 """
781791 Create an L{EndpointCaller} to perform name matching and call it.
782792 @param parameters: An object specifying the data,
783793 and possible metadata, to be processed by the name matcher.
784794 @type parameters: L{NameMatchingParameters}
785795 @return: A python dictionary containing the results of name matching."""
786- return EndpointCaller (self , "matched-name" ).call (parameters )
796+ return EndpointCaller (self , "name-similarity" ).call (parameters )
797+
798+ def matched_name (self , parameters ):
799+ """ deprecated
800+ Call name_similarity to perform name matching.
801+ @param parameters: An object specifying the data,
802+ and possible metadata, to be processed by the name matcher.
803+ @type parameters: L{NameMatchingParameters}
804+ @return: A python dictionary containing the results of name matching."""
805+ return self .name_similarity (parameters )
0 commit comments