Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
macaon2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexis Nasr
macaon2
Commits
5be87a14
Commit
5be87a14
authored
7 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a mistake on the getter and added a way to get the current state of the global variable
parent
70a4f826
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
maca_common/include/dico.h
+3
-2
3 additions, 2 deletions
maca_common/include/dico.h
maca_common/src/dico.c
+6
-1
6 additions, 1 deletion
maca_common/src/dico.c
with
9 additions
and
3 deletions
maca_common/include/dico.h
+
3
−
2
View file @
5be87a14
...
...
@@ -8,7 +8,7 @@
#define DICO_START_STR "##_DICO_START_##"
#define DICO_END_STR "##_DICO_END_##"
typedef
struct
struct
dico
{
char
*
name
;
int
nbelem
;
...
...
@@ -16,7 +16,7 @@ typedef struct
hash
*
htable
;
char
**
array
;
static
bool
add_unknown_strings
;
}
dico
;
};
dico
*
dico_new
(
char
*
name
,
int
size
);
void
dico_free
(
dico
*
d
);
...
...
@@ -29,6 +29,7 @@ dico *dico_read(char *filename, float ratio);
dico
*
dico_read_fh
(
FILE
*
f
,
float
ratio
);
dico
*
dico_extract_from_corpus
(
char
*
filename
,
int
column
,
char
*
dico_name
);
bool
dico_get_add_unknown_strings
();
void
dico_set_add_unknown_strings
();
void
dico_unset_add_unknown_strings
();
...
...
This diff is collapsed.
Click to expand it.
maca_common/src/dico.c
+
6
−
1
View file @
5be87a14
...
...
@@ -6,6 +6,11 @@
bool
dico
::
add_unknown_strings
;
bool
dico_get_add_unknown_strings
()
{
return
dico
::
add_unknown_strings
;
}
void
dico_set_add_unknown_strings
()
{
dico
::
add_unknown_strings
=
true
;
...
...
@@ -13,7 +18,7 @@ void dico_set_add_unknown_strings()
void
dico_unset_add_unknown_strings
()
{
dico
::
add_unknown_strings
=
tru
e
;
dico
::
add_unknown_strings
=
fals
e
;
}
dico
*
dico_new
(
char
*
name
,
int
size
)
...
...
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