Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit e1819c1c authored by Arnaud Bey's avatar Arnaud Bey
Browse files

add index on clean value

parent 745c6643
......@@ -6,9 +6,13 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use JsonSerializable;
use Doctrine\ORM\Mapping\Index;
/**
* @ORM\Table(name="lexicon_word")
* @ORM\Table(name="lexicon_word", indexes={
* @Index(columns={"clean_value"}, name="cleanValue"),
* @Index(name="language", columns={"language_id"}),
* }))
* @ORM\Entity(repositoryClass="LexiconBundle\Repository\WordRepository")
*/
class Word implements JsonSerializable
......
......@@ -48,6 +48,7 @@ class GridManager
public function generate(Language $language, $debug = false, $minBigram = null)
{
$grid = $this->newGrid($language, 4);
$minBigram = ($minBigram == null) ? $language->getMinBigram() : $minBigram;
$letters = $this->lottery($language, 4, $debug, $minBigram);
......@@ -350,7 +351,7 @@ class GridManager
public function lottery(Language $language, $side, $debug = false, $minBigram = null)
{
$minBigram = ($minBigram == null) ? $language->getMinBigram() : $minBigram;
$fileBigrams = $language->getDirectory().DIRECTORY_SEPARATOR."bigrams.txt";
// On crée un tableau de bigrammes
// où chaque bigramme apparait autant de fois que son poids
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment