aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/hydro_roll/models
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2024-02-27 11:46:36 +0800
committer简律纯 <i@jyunko.cn>2024-02-27 11:46:36 +0800
commitcac060a6e8b70e4e4e1b34555d3d4fee8bc6d007 (patch)
treec3777687637c44d38690a364a363a8336424b59a /hydro_roll/models
parent255c259cbf5ea143927dd988049c4d9ed14ac4f7 (diff)
downloadHydroRoll-cac060a6e8b70e4e4e1b34555d3d4fee8bc6d007.tar.gz
HydroRoll-cac060a6e8b70e4e4e1b34555d3d4fee8bc6d007.zip
refactor!: rename HydroRoll dir as hydro_roll
Diffstat (limited to 'hydro_roll/models')
-rw-r--r--hydro_roll/models/__init__.py0
-rw-r--r--hydro_roll/models/hola.pklbin0 -> 209 bytes
-rw-r--r--hydro_roll/models/utils.py14
3 files changed, 14 insertions, 0 deletions
diff --git a/hydro_roll/models/__init__.py b/hydro_roll/models/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/hydro_roll/models/__init__.py
diff --git a/hydro_roll/models/hola.pkl b/hydro_roll/models/hola.pkl
new file mode 100644
index 0000000..b9940fa
--- /dev/null
+++ b/hydro_roll/models/hola.pkl
Binary files differ
diff --git a/hydro_roll/models/utils.py b/hydro_roll/models/utils.py
new file mode 100644
index 0000000..73e7ba0
--- /dev/null
+++ b/hydro_roll/models/utils.py
@@ -0,0 +1,14 @@
+import difflib
+import pickle
+
+def find_max_similarity(input_string, string_list):
+ max_similarity = 0
+ max_string = ""
+
+ for string in string_list:
+ similarity = difflib.SequenceMatcher(None, input_string, string).quick_ratio()
+ if similarity > max_similarity:
+ max_similarity = similarity
+ max_string = string
+
+ return max_string, max_similarity \ No newline at end of file