Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ease
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
ease
Commits
bf87cfa7
Commit
bf87cfa7
authored
Nov 28, 2012
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alter create to use the full passed in path
parent
44738c16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
10 deletions
+1
-10
create.py
+1
-3
util_functions.py
+0
-7
No files found.
create.py
View file @
bf87cfa7
...
...
@@ -22,9 +22,7 @@ def create(text,score,prompt_string,model_path):
except
:
results
[
'errors'
]
.
append
(
"feature extraction and model creation failed."
)
try
:
full_path
=
os
.
path
.
join
(
base_path
,
model_path
)
util_functions
.
create_directory
(
full_path
)
model_creator
.
dump_model_to_file
(
prompt_string
,
feature_ext
,
classifier
,
text
,
score
,
full_path
)
model_creator
.
dump_model_to_file
(
prompt_string
,
feature_ext
,
classifier
,
text
,
score
,
model_path
)
results
[
'created'
]
=
True
except
:
results
[
'errors'
]
.
append
(
"could not write model to: {0}"
.
format
(
model_path
))
...
...
util_functions.py
View file @
bf87cfa7
...
...
@@ -24,13 +24,6 @@ def create_model_path(model_path):
return
model_path
def
create_directory
(
model_path
):
directory
=
path
(
model_path
)
.
dirname
()
if
not
os
.
path
.
exists
(
directory
):
os
.
makedirs
(
directory
)
return
True
def
sub_chars
(
string
):
"""
Strips illegal characters from a string. Used to sanitize input essays.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment