Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Practico2 #2

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions corpus/ancora.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def elements(self, fileids=None):
return LazyConcatenation(self.xmlreader.xml(f) for f in fileids)

def tagged_words(self, fileids=None):
# XXX: use LazyConcatenation?
return LazyConcatenation(self.tagged_sents(fileids))

def __repr__(self):
Expand Down
Binary file added languagemodeling/__pycache__/__init__.cpython-34.pyc
Binary file not shown.
Binary file added languagemodeling/__pycache__/ngram.cpython-34.pyc
Binary file not shown.
66 changes: 66 additions & 0 deletions languagemodeling/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
EJercico 2: Modelo de n-gramas.

Se agregaron test para 3-gramas.


Ejercico 3: Generación de Texto

Oraciones generadas con :

*Unigramas:
> " tail in , " was me smiling delight Dursley he jerked of life . " the . the there moving impression

> In " his into Harry upon quite when and he have at out Fred them " . order you country moonlight Ron gracious scowl his said
they talking a than George had , muscle the . to exit Aragog " the all While or o top the ago if bottle although Weasley to .
be had that wizard send

> from bend too from and . , evidence Ron at " three , shoulder " door not wand might on ? , there somebody

> Well an tree Harry and don cause Harry


*Bigramas:
> Harry didn ' fing , taking the old man through the potion .

> What ?

> Neville , had brought along , I mentioned anything to each other champions please make sure that includes my House team
because Lupin .

> Professor Sprout briskly , " Mudblood mother and slumped down , then move , " That ' t Apparate or get him from Ron as death .
" That was fully grown four ... "


*Trigramas:
> Bad blood will out .

> " Not a soul alive , " said Harry , Ron and the sorts of things and the sound of the cabin windows , glimmering stones .

> ' As a matter that we I mean you know . .

> I cannot defend myself .


*Cuatrigramas:
> " You know what day it is ?

> He climbed carefully along one of the Bouncing Bulbs wriggled free from Harry ' s , and drank once more .

> More of the Death Eaters ; Sirius ' s only Defense Against the Dark Arts ourselves , " said the elf in his arms .

> Winky hiccuped again .


Ejercicio 5: Evaluacion de modelos de lenguaje.

Perplexity con addone 1-grama = 486.07454895303124

Perplexity con addone 2-grama = 751.9095526748273

Perplexity con addone 3-grama = 4373.804100034255

Perplexity con addone 4-grama = 8897.41296365954


Ejercicio 6: Suavizado por Interpolación.

61 changes: 61 additions & 0 deletions languagemodeling/readme.txt~
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Ejercico 3: Generación de Texto

Oraciones generadas con :

*Unigramas:
> " tail in , " was me smiling delight Dursley he jerked of life . " the . the there moving impression

> In " his into Harry upon quite when and he have at out Fred them " . order you country moonlight Ron gracious scowl his said
they talking a than George had , muscle the . to exit Aragog " the all While or o top the ago if bottle although Weasley to .
be had that wizard send

> from bend too from and . , evidence Ron at " three , shoulder " door not wand might on ? , there somebody

> Well an tree Harry and don cause Harry


*Bigramas:
> Harry didn ' fing , taking the old man through the potion .

> What ?

> Neville , had brought along , I mentioned anything to each other champions please make sure that includes my House team
because Lupin .

> Professor Sprout briskly , " Mudblood mother and slumped down , then move , " That ' t Apparate or get him from Ron as death .
" That was fully grown four ... "


*Trigramas:
> Bad blood will out .

> " Not a soul alive , " said Harry , Ron and the sorts of things and the sound of the cabin windows , glimmering stones .

> ' As a matter that we I mean you know . .

> I cannot defend myself .


*Cuatrigramas:
> " You know what day it is ?

> He climbed carefully along one of the Bouncing Bulbs wriggled free from Harry ' s , and drank once more .

> More of the Death Eaters ; Sirius ' s only Defense Against the Dark Arts ourselves , " said the elf in his arms .

> Winky hiccuped again .


Ejercicio 5: Evaluacion de modelos de lenguaje.

Perplexity con addone 1-grama = 486.07454895303124

Perplexity con addone 2-grama = 751.9095526748273

Perplexity con addone 3-grama = 4373.804100034255

Perplexity con addone 4-grama = 8897.41296365954


Ejercicio 6: Suavizado por Interpolación.

Loading