aboutsummaryrefslogtreecommitdiffstats
path: root/tf_idf.py
diff options
context:
space:
mode:
Diffstat (limited to 'tf_idf.py')
-rw-r--r--tf_idf.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/tf_idf.py b/tf_idf.py
index 615720d..883f236 100644
--- a/tf_idf.py
+++ b/tf_idf.py
@@ -1,17 +1,17 @@
-import math as maths
-import database
-
-def main():
- with database.Database() as db:
- db.build_tf_idf_table()
-
- db.get_tf_idf_table()
-
-def calc_log_tf(tf):
- if tf == 0:
- return 0
- else:
- return maths.log10(1 + tf)
-
-if __name__ == "__main__":
+import math as maths
+import database
+
+def main():
+ with database.Database() as db:
+ db.build_tf_idf_table()
+
+ db.get_tf_idf_table()
+
+def calc_log_tf(tf):
+ if tf == 0:
+ return 0
+ else:
+ return maths.log10(1 + tf)
+
+if __name__ == "__main__":
main() \ No newline at end of file