Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
takkyuu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alice Brenon
takkyuu
Commits
bb3b9a16
Commit
bb3b9a16
authored
3 years ago
by
Alice Brenon
Browse files
Options
Downloads
Patches
Plain Diff
Rename 'dico' to something more meaningful
parent
3ea7287e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/Text/Takkyuu/French.hs
+2
-2
2 additions, 2 deletions
lib/Text/Takkyuu/French.hs
lib/Text/Takkyuu/NLP.hs
+4
-4
4 additions, 4 deletions
lib/Text/Takkyuu/NLP.hs
with
6 additions
and
6 deletions
lib/Text/Takkyuu/French.hs
+
2
−
2
View file @
bb3b9a16
...
...
@@ -12,7 +12,7 @@ module Text.Takkyuu.French (
import
Data.Char
(
isSpace
,
toLower
)
import
qualified
Data.Map
as
Map
(
fromList
)
import
qualified
Data.Set
as
Set
(
fromList
)
import
Text.Takkyuu
(
Game
,
Label
(
..
),
Labeled
(
..
),
dico
,
fuzz
,
labelizer
,
rules
)
import
Text.Takkyuu
(
Game
,
Label
(
..
),
Labeled
(
..
),
fuzz
,
lookupTable
,
labelizer
,
rules
)
data
POS
=
Determiner
...
...
@@ -43,7 +43,7 @@ typo :: Functor m => Game Char Char m
typo
=
fuzz
$
Set
.
fromList
[
"bh"
]
french
::
Functor
m
=>
Game
Char
String
m
french
=
dico
toLower
isSpace
$
Set
.
fromList
[
"le"
,
"la"
,
"chat"
,
"lait"
,
"marché"
]
french
=
lookupTable
toLower
isSpace
$
Set
.
fromList
[
"le"
,
"la"
,
"chat"
,
"lait"
,
"marché"
]
tag
::
Functor
m
=>
Game
String
LabeledWord
m
tag
=
labelizer
(
fmap
toLower
)
$
Map
.
fromList
[
...
...
This diff is collapsed.
Click to expand it.
lib/Text/Takkyuu/NLP.hs
+
4
−
4
View file @
bb3b9a16
module
Text.Takkyuu.NLP
(
Label
(
..
)
,
Labeled
(
..
)
,
dico
,
fuzz
,
lookupTable
,
labelizer
,
rules
)
where
...
...
@@ -25,8 +25,8 @@ fuzz classes = accept expand back
)
tmp0
l
)
Map
.
empty
classes
dico
::
(
Functor
m
,
Eq
k
,
Ord
k
)
=>
(
a
->
k
)
->
(
k
->
Bool
)
->
Set
[
k
]
->
Game
a
[
a
]
m
dico
projector
_
vocabulary
=
start
lookupTable
::
(
Functor
m
,
Eq
k
,
Ord
k
)
=>
(
a
->
k
)
->
(
k
->
Bool
)
->
Set
[
k
]
->
Game
a
[
a
]
m
lookupTable
projector
_
vocabulary
=
start
where
start
=
Opponent
$
continueFrom
(
[]
,
[
vocabulary
])
continueFrom
currentState
@
(
stack
,
candidatesStack
)
(
Here
a
)
=
...
...
@@ -68,4 +68,4 @@ labelizer projector labels = accept outputLabels back
oneOf
$
maybe
[
Labeled
a
Unknown
]
(
Labeled
a
.
Label
<$>
)
possibleLabels
rules
::
(
Functor
m
,
Ord
k
)
=>
(
a
->
k
)
->
Set
[
k
]
->
Game
a
[
a
]
m
rules
projector
=
dico
projector
undefined
rules
projector
=
lookupTable
projector
undefined
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment