|
|
|
@ -26,6 +26,9 @@ def levenshtein_distance(s1, s2):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def find_closest_actor_name(input_name, actor_names):
|
|
|
|
|
if input_name in actor_names:
|
|
|
|
|
return input_name
|
|
|
|
|
|
|
|
|
|
closest_name = None
|
|
|
|
|
min_distance = float('inf')
|
|
|
|
|
for i in range(len(actor_names)):
|
|
|
|
@ -81,6 +84,12 @@ def add_actor(actor_names):
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def find_direct_actor_name(df, searchedValue):
|
|
|
|
|
if 'primaryName' in df.columns:
|
|
|
|
|
if searchedValue in df['primaryName'].values:
|
|
|
|
|
return searchedValue
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
mustContinue = True
|
|
|
|
|
if not os.path.exists("processedData/uniqueActorNames.tsv"):
|
|
|
|
|