Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathieu Loiseau
MagicWord
Commits
9cd7d5c9
Commit
9cd7d5c9
authored
Jun 13, 2019
by
Arnaud Bey
Browse files
remove trace
parent
a3636a2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
application/src/MagicWordBundle/Command/GenerateGridCommand.php
View file @
9cd7d5c9
...
...
@@ -111,15 +111,5 @@ class GenerateGridCommand extends ContainerAwareCommand
$output
->
writeln
(
'Worst grid : <error>'
.
$worst
.
'</error>'
);
$output
->
writeln
(
'Nombre de formes différentes : <error>'
.
$countDistinctFoundables
.
'</error>'
);
$output
->
writeln
(
'<info>#######################################################################</info>'
);
//STATS
$filesystem
=
new
Filesystem
();
$filename
=
"data/import-"
.
date
(
"Y-m-d"
)
.
"-"
.
time
()
.
"-"
.
uniqid
()
.
".txt"
;
arsort
(
$globalFoundables
);
file_put_contents
(
$filename
,
"count
\t
"
.
count
(
$globalFoundables
)
.
"
\n
"
,
FILE_APPEND
);
foreach
(
$globalFoundables
as
$key
=>
$value
)
{
file_put_contents
(
$filename
,
$key
.
"
\t
"
.
$value
.
"
\n
"
,
FILE_APPEND
);
}
}
}
application/src/MagicWordBundle/Manager/GridManager.php
View file @
9cd7d5c9
...
...
@@ -388,7 +388,6 @@ class GridManager
$nbInferiorBigram
++
;
$centile
=
100
-
intval
((
$nbBigrams
-
$nbInferiorBigram
)
*
100
/
$nbBigrams
);
$centilesBigrams
[
$bigramToFreq
]
=
$centile
;
//file_put_contents("data/log_bigram.txt", $bigramToFreq."\t".$centile."\n", FILE_APPEND);
if
(
$centilesBigrams
[
$bigramToFreq
]
>=
$minBigram
)
{
$bigramLetters
=
preg_split
(
'//u'
,
$bigramToFreq
,
null
,
PREG_SPLIT_NO_EMPTY
);
foreach
(
$bigramLetters
as
$bigramLetter
)
{
...
...
@@ -402,8 +401,7 @@ class GridManager
}
$countsBigram
=
array_count_values
(
$bigrams
);
// var_dump($countsBigram);
// die();
// // On initialise une grille vide.
$grid
=
[];
for
(
$i
=
0
;
$i
<
$side
;
$i
++
)
{
...
...
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