Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Major Project Handcrafted
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
jonathan.poalses
Major Project Handcrafted
Commits
14af2ce2
Commit
14af2ce2
authored
May 17, 2023
by
Jonathan Poalses
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finished, I think. Still have to seperate out the training and testing samples though...
parent
e5d7f4a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
6 deletions
+1
-6
dialect_nlp.clj
src/poalses/jonathan/dialect/dialect_nlp.clj
+0
-5
main.clj
src/poalses/jonathan/dialect/main.clj
+1
-1
No files found.
src/poalses/jonathan/dialect/dialect_nlp.clj
View file @
14af2ce2
...
@@ -113,12 +113,7 @@
...
@@ -113,12 +113,7 @@
(
let
[
filedata
(
clojure.edn/read-string
(
slurp
filename
))
(
let
[
filedata
(
clojure.edn/read-string
(
slurp
filename
))
key-results
(
map
detect-sample-dialect
(
keys
filedata
))
key-results
(
map
detect-sample-dialect
(
keys
filedata
))
expected-results
(
map
keyword
(
vals
filedata
))]
expected-results
(
map
keyword
(
vals
filedata
))]
(
println
filedata
)
(
println
key-results
)
(
println
expected-results
)
(
let
[
result-comparison
(
map
zero?
(
map
compare
key-results
expected-results
))]
(
let
[
result-comparison
(
map
zero?
(
map
compare
key-results
expected-results
))]
(
println
(
interleave
(
keys
filedata
)
result-comparison
))
(
println
(
zipmap
expected-results
result-comparison
))
(
println
(
str
(
count
(
filter
true?
result-comparison
))
"/"
(
count
result-comparison
)
" correct."
)))))
(
println
(
str
(
count
(
filter
true?
result-comparison
))
"/"
(
count
result-comparison
)
" correct."
)))))
...
...
src/poalses/jonathan/dialect/main.clj
View file @
14af2ce2
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
(
def
command-line-options
(
def
command-line-options
"Command line options parsing rules."
"Command line options parsing rules."
[[
"-l"
"--log-level LEVEL"
(
str
"Logging level "
(
seq
log-levels
))
[[
"-l"
"--log-level LEVEL"
(
str
"Logging level "
(
seq
log-levels
))
:default
:
info
:default
:
error
:parse-fn
#
(
keyword
(
string/join
(
rest
%
)))
:parse-fn
#
(
keyword
(
string/join
(
rest
%
)))
:validate
[
#
(
contains?
log-levels
%
)
:validate
[
#
(
contains?
log-levels
%
)
(
str
"Must be one of: "
(
seq
log-levels
))]]
(
str
"Must be one of: "
(
seq
log-levels
))]]
...
...
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