Skip to content

Commit 35bb8bb

Browse files
author
Adam Soos
committed
WS-3151: fix description, fix example
1 parent df50abc commit 35bb8bb

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

examples/record_similarity.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ def run(key, alt_url='https://api.rosette.com/rest/v1/'):
9191
params["properties"] = properties
9292
params["records"] = records
9393

94-
#params["parameters"] = {"conflictScore": "0.9", "deletionScore": "0.2"}
95-
9694
try:
9795
return api.record_similarity(params)
9896
except RosetteException as exception:
@@ -107,6 +105,6 @@ def run(key, alt_url='https://api.rosette.com/rest/v1/'):
107105
default='https://api.rosette.com/rest/v1/')
108106

109107
if __name__ == '__main__':
110-
# ARGS = PARSER.parse_args()
111-
RESULT = run("key", "http://localhost:8181/rest/v1/")
108+
ARGS = PARSER.parse_args()
109+
RESULT = run(ARGS.key, ARGS.url)
112110
print(RESULT)

rosette/api.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,10 @@ def validate(self):
348348
class RecordSimilarityParameters(_RequestParametersBase):
349349
"""Parameter object for C{record-similarity} endpoint.
350350
Required:
351-
C{records} A list of C{record} objects
352-
C{properties} A C{property} object
353-
C{fields} A dictionary of C{field} objects
351+
C{records} The records to be compared; where each left record is compared to the associated right record.
352+
C{properties} Parameters used in the call
353+
C{fields} The definition of the fields used in the comparison. There must be a minimum of 1 field and
354+
can have a maximum of 5 fields.
354355
"""
355356

356357
def __init__(self):

0 commit comments

Comments
 (0)