Skip to content

Commit

Permalink
create basic structure for rltk v2, disable CI and anaconda for current
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatYYX committed Mar 20, 2018
1 parent ba54b3f commit 8fa9ff0
Show file tree
Hide file tree
Showing 23 changed files with 74 additions and 1,997 deletions.
File renamed without changes.
38 changes: 0 additions & 38 deletions environment.yml

This file was deleted.

16 changes: 1 addition & 15 deletions examples/ex1/ex1.py
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
# -*- coding: utf-8 -*-

import rltk

edit_distance_cost = {'insert': {'c':50}, 'insert_default':100, 'delete_default':100, 'substitute_default':100}

tk = rltk.init()
tk.load_edit_distance_table('A1', edit_distance_cost)
tk.load_df_corpus('B1', 'df_corpus_1.txt', file_type='text', mode='append')
tk.load_df_corpus('B2', 'jl_file_1.jsonl', file_type='json_lines', json_path='desc[*]', mode='append')

print tk.levenshtein_distance('a', 'abc')
print tk.levenshtein_distance('a', 'abc', name='A1')
print tk.tf_idf_similarity(['a', 'b', 'a'], ['a', 'c','d','f'], name='B1')
print tk.tf_idf_similarity(['abc'], ['abc', 'def'], name='B2')
import rltk as tk
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ jupyter>=1.0.0
munkres==1.0.8
numpy>=1.12.0
Sphinx>=1.5
scikit-learn>=0.18.1
scipy>=0.19.0
sphinx-autobuild>=0.6.0
sphinxcontrib-napoleon>=0.6.0
32 changes: 7 additions & 25 deletions rltk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
import __builtin__

__builtin__.rltk = {
'enable_cython': False
}

import core


def enable_cython(enable=False):
"""
Enable cython support. It's a global change.
"""
__builtin__.rltk['enable_cython'] = enable
reload(core)


def init():
"""
Initialization method.
Returns:
object: RLTK object
"""
return core.Core()
from evaluation import *
from indexer import *
from similarity import *
from tokenizer import *
from core import *
from record import Record
from record_iterator import RecordIterator
54 changes: 0 additions & 54 deletions rltk/classifier.py

This file was deleted.

3 changes: 0 additions & 3 deletions rltk/configuration.py

This file was deleted.

0 comments on commit 8fa9ff0

Please sign in to comment.