Skip to content

Commit

Permalink
Merge pull request #11 from erikdab/improve-rl
Browse files Browse the repository at this point in the history
Improve rl
  • Loading branch information
erikdab committed Jun 23, 2017
2 parents 6dfe2b9 + de7f96f commit af3b0ed
Show file tree
Hide file tree
Showing 26 changed files with 266 additions and 2,165 deletions.
29 changes: 16 additions & 13 deletions conf/conf.ini
Expand Up @@ -8,18 +8,22 @@ uid=plwn-sql
db-file=~/repos/WordnetLoom/config/db/Local.properties

[target2]
uid=plwn-sql
db-file=~/repos/WordnetLoom/config/db/Local.properties
uid=pwn-nltk

[relaxer]
; comma seperated list of constraints to apply.
constraints=ii
weights_ii=0,0,0
; comma seperated list of parts of speech (options: n, v, a, )
; comma seperated list of parts of speech (options: n, v, a, r)
pos=n
; comma seperated list of constraints to apply.
constraints=hyper_hypo,daughters,words,glosses

; Weights for constraints, key is the Constraint.id()
; Weights for constraints, key is the Constraint.uid()
; If just single weight, use this.
[weights]
words=0
glosses=0
; If multiple information, use this
[hyper_hypo]
active=ii,ai
iie=0
iio=0
iib=0
Expand All @@ -29,12 +33,11 @@ aib=0
aae=0
aao=0
aab=0
daught_one=0
daught_equal=0
daught_diff=0
antonyms=0
words=0
gloss=0
[daughters]
active=one
one=0
equal=0
diff=0

[translater]
type=cascade
Expand Down
15 changes: 0 additions & 15 deletions conf/db_template.properties

This file was deleted.

1 change: 0 additions & 1 deletion data/pos.txt
@@ -1,4 +1,3 @@

id char name fullname domain_ids
0 0 unknown nieznana 49;3;37;7;16;34;32;40;42;31;36;28;8;12;4;35;46;14;29;23;45;13;25;15;44;18;43;10;21;22;39;1;20;38;17;27;41;26;47;9;33;6;11;19;30;5;24
1 v verb czasownik 49;37;34;32;40;42;31;36;35;29;43;39;38;41;33;30
Expand Down
2 changes: 1 addition & 1 deletion pyrelaxmapper/commands.py
Expand Up @@ -66,4 +66,4 @@ def make_relax(relaxer):
click.secho('Running relaxation labeling.', fg='blue')
relaxer.relax()
click.secho('Done relaxation labeling.', fg='blue')
return relaxer
return relaxer
16 changes: 11 additions & 5 deletions pyrelaxmapper/conf.py
Expand Up @@ -32,6 +32,12 @@ def search_paths():
click.get_app_dir(APPLICATION)]


def ensure_dir(directory):
"""File in directory."""
if not os.path.exists(directory):
os.makedirs(directory)
return directory

def ensure_dir(directory):
"""File in directory."""
if not os.path.exists(directory):
Expand Down Expand Up @@ -221,6 +227,9 @@ def load_properties(file):
return config


class Config:
"""Application Configuration.
class Config:
"""Application Configuration.

Expand Down Expand Up @@ -394,8 +403,5 @@ def results_dir(self):
def clean_cache(self):
clean_directory(self.cache_dir())

def file_candidates(self):
return '({} -> {}) Candidates'.format(self.source_wn().name(), self.target_wn().name())

def file_relaxer(self):
return '({} -> {}) Relaxer'.format(self.source_wn().name(), self.target_wn().name())
def mapping_group(self):
return '{} -> {}'.format(self.source_wn().name(), self.target_wn().name())
76 changes: 0 additions & 76 deletions pyrelaxmapper/data.py

This file was deleted.

20 changes: 0 additions & 20 deletions pyrelaxmapper/db.py

This file was deleted.

17 changes: 0 additions & 17 deletions pyrelaxmapper/decycle.py

This file was deleted.

0 comments on commit af3b0ed

Please sign in to comment.