• Non ci sono risultati.

La seguente tabella riassume i risultati del sistema sulle frasi selezionate, all’interno delle quali sono stati inseriti degli errori. Nella tabella, tutte le frasi che presentano un asterisco nel numero sono una variante di quella precedente, e le frasi in cui sarà riscontrato errori avranno una riga sotto con lo stesso numero accompagnato da una “r”, la quale starà ad indicare che è il risultato della sostituzione eseguita dal modulo di rimpiazzo.

Frase Analisi Frase Caratteristiche n-gramma Note Dim. Sovrapp. 1 4 2 1r 2 4 2 3 4 2 3r 4 4 2

I suspect they're better at these stage than the same time last year.

I suspect they're better at these stage than the same time last year.

L'algoritmo risponde bene.

these->this, ripening stage->better, rather, cycles

Il modulo di rimpiazzamento ha trovato la giusta correzione. That are last year's

thing.

That are last year's thing.

L'espressione è

comunemente usata nel web, il controllore non segnala l'errore. You can get us all at

the same time these way.

You can get us all at the same time these way. L'algoritmo risponde bene. these->that, are stage->are, dimes Il modulo di rimpiazzamento non ha trovato la giusta correzione.

For the first time these man looked sceptical.

For the first time these man looked sceptical.

L'algoritmo trova il quadrigramma "man looked sceptical" ma quando risale nei bigrammi il rate di "looked sceptical" è più basso di quello di "these man".

5 4 2 6 4 2 6r 7 4 2 8 4 2 8r 9 4 2 10 4 2 10r 11 4 2 This do it by operating a sprinkler for a preset time each day.

This do it by

operating a sprinkler for a preset time each day.

L'algortimo non segnala l'errore poiché il

quadrigramma "This do it by" è diffuso, ma fa abbassare la soglia rispetto alla versione corretta che porta il bigramma "sprinkler for" ad essere erratto

I think it are time the thing was put a stop to.

I think it are time the thing was put a stop to.

L'algoritmo risponde bene.

are->

time->there, of, aeroplanes

Il modulo di

rimpiazzamento non ha trovato la giusta correzione. In all the time the child

were away she never received them.

In all the time the child were away she never received them.

L'algoritmo risponde bene.

They runs out two thirds of the way through the year.

They runs out two thirds of the way through the year.

L'algoritmo risponde bene.

They-> runs->took, sent, give

Il modulo di

rimpiazzamento non ha trovato la giusta correzione. The price of the bow

was as much as the income of a common man for an year.

The price of the bow was as much as the income of a common man for an year.

L'espressione è

comunemente usata nel web, il controllore non segnala l'errore, e invece segnala il bigrmma "bow was" come nella versione corretta.

Now million of visitors come every year for day trips and holidays.

Now million of visitors come every year for day trips and holidays. L'algoritmo risponde bene. Now-> million->millions, thinking Il modulo di rimpiazzamento ha trovato la giusta correzione.

People says that at every quarter day for the past year nobody took much notice.

People says that at

every quarter day for the past year nobody

took much notice.

L'algortimo non segnala l'errore poiché il

quadrigramma "Peaple says that at" è diffuso, ma fa abbassare la soglia rispetto alla versione corretta che porta i bigrammi "every quarter" e "year nobody" ad essere erratti

12 4 2 12r 13 4 2 13r 14 4 2 14r 15 4 2 15r 16 4 2 17* 4 2 17r 18 4 2 18r

It was the coldest time of the year and the first thing I insisted on was haves a telephone.

It was the coldest time of the year and the first thing I insisted on

was haves a telephone.

L'algoritmo risponde bene.

was->be, was, is haves->assigned, not, essentially

Il modulo di

rimpiazzamento non ha trovato la giusta correzione. She said one of they

spoke to her own four year old child.

She said one of they spoke to her own four year old child.

L'algoritmo risponde bene.

they->the, a, Israel spoke->did, said, say

Il modulo di

rimpiazzamento non ha trovato la giusta correzione. I got to be grown up

and ask people an way.

I got to be grown up and ask people an way.

L'algoritmo risponde bene.

an->which, the, by way->important, abstract, open

Il modulo di rimpiazzamento ha trovato la giusta correzione. That was one men he

wanted people to grieve for.

That was one men he wanted people to grieve for.

L'algoritmo risponde bene.

men->decided, that, thing he->and

Il modulo di

rimpiazzamento non ha trovato la giusta correzione. I wants to touch you

the way no man has ever touched you.

I wants to touch you the way no man has ever touched you.

L'espressione è

comunemente usata nel web, il controllore non segnala l'errore. I want to touch you the

way no man has ever touching you.

I want to touch you the way no man has

ever touching you.

L'algoritmo risponde bene.

ever->been, people, stopped touching->inspired, told, said to

Il modulo di

rimpiazzamento non ha trovato la giusta correzione. The sky was turn

several shades of blue as night gave way to day.

The sky was turn several shades of blue as night gave way to day. L'algoritmo risponde bene. turn->also, looking, in several->50, to Il modulo di rimpiazzamento non ha trovato la giusta correzione.

19* 4 2 19r 20 4 2 21* 4 2 22 4 2 22r 23* 4 2 24* 4 2 24r 25 4 2 25r

The sky have turning several shades of blue as night gave way to day.

The sky have turning

several shades of blue as night gave way to day.

L'algoritmo risponde bene.

have->was turning->teeth, in, been

Il modulo di rimpiazzamento ha trovato la giusta correzione. It do not reflect the way

this whole thing happened.

It do not reflect the way this whole thing happened.

L'espressione è

comunemente usata nel web, il controllore non segnala l'errore. You does not reflect

the way this whole thing happened.

You does not reflect the way this whole thing happened.

L'espressione è

comunemente usata nel web, il controllore non segnala l'errore. And on these third day

the whole thing was still a blur.

And on these third

day the whole thing was still a blur.

L'algoritmo risponde bene. these->the third-> Il modulo di rimpiazzamento non ha trovato la giusta correzione. And on this third day

the whole thing were still a blur.

-And on this third day the whole thing were still a blur.

L'espressione è

comunemente usata nel web, il controllore non segnala l'errore. And on this third day

the whole thing been still a blur.

-And on this third day the whole thing been still a blur.

L'algoritmo risponde bene.

thing->have

been->is, but | still → such, offered, advocating

Il modulo di

rimpiazzamento non ha trovato la giusta correzione. He talking about his

gray shadow which was one days a handsome man.

He talking about his

gray shadow which was one days a handsome man.

L'espressione "He talking about his" è

comunemente usata nel web, il controllore non segnala l'errore. Mentre segnala "one days". one->seven, 2 days->day, calls Il modulo di rimpiazzamento ha trovato la giusta correzione per il bigramma "one days".

26 4 2 26r 27* 4 2 28 4 2 22r 29 4 2 17r 30 4 2 31 4 2 31r

Suffice to say that Tim won a lot of respect from a lot of people those day.

Suffice to say that Tim won a lot of respect from a lot of people

those day. L'algoritmo risponde bene. those->every, per day-> Il modulo di rimpiazzamento non ha trovato la giusta correzione. Suffice to said that Tim

won a lot of respect from a lot of people that day.

Suffice to said that Tim won a lot of respect from a lot of people that day.

È riuscito a individuare il quadrigramma in cui è presente l'errore, ma dato che il bigramma "Suffice to" ha meno occorrenze di "to said", quindi non riconosce quest'ultimo come errato.

It really is, this is the thing that people won't believes.

It really is, this is the thing that people

won't believes.

L'algoritmo risponde bene.

won't-> who, actually, he

Bbelieves->

Il modulo di

rimpiazzamento non ha trovato la giusta correzione. When I was a child,

few people has cars and buses were infrequent.

When I was a child, few people has cars and buses were infrequent. L'algoritmo risponde bene. people->years, that has->buying, lease Il modulo di rimpiazzamento non ha trovato la giusta correzione. Her heart leaped and

she ran the rest of the way like a children in her delight.

Her heart leaped and she ran the rest of the way like a children in

her delight.

È riuscito a individuare il quadrigramma in cui è presente l'errore, ma dato che il bigramma "her delight" ha meno occorrenze di "in her", quindi non lo riconosce come errore.

A man kills the thing he loves, and he must dies a little himself.

A man kills the thing he loves, and he must dies a little himself.

Come nella versione corretta riconosce il bigramma "man kills" come errato, ma riconosce anche l'errore nel secondo segmento "must dies".

must->just, also, that dies->be, maintain, dig

Il modulo di

rimpiazzamento non ha trovato la giusta correzione.

32 4 2 33 4 2 33r 34 4 2 34r 35 4 2 36 4 2 37 4 2 37r 38 4 2 39 4 2

The man and the child on the other side watched he with interest.

The man and the child on the other side watched he with interest.

È riuscito a individuare il quadrigramma in cui è presente l'errore, ma dato che il bigramma "side watched" ha meno occorrenze di "whatched he", quindi non lo riconosce come errore. He has got John riding

every day, and these child is only four.

He has got John riding every day, and these child is only four.

L'algoritmo risponde bene.

these->the, your

child->assertion, discussion, phenomena

Il modulo di

rimpiazzamento non ha trovato la giusta correzione. My little cat, as you

see, likes to play with my dog.

My little cat, as you see, likes to play with my dog.

L'algoritmo risponde bene.

cat->cat, shit, tiger likes->love, likes, tries

Il modulo di

rimpiazzamento non ha trovato la giusta correzione. My mother knows that

my favourite foods, and you surely agree with her, is pizza and chocolate.

My mother knows that my favourite foods, and you surely agree with her, is pizza and chocolate.

L'espressione è

discretamente usata nel web, il controllore non segnala l'errore. On May 12 these year

32 people reached the summit of Everest.

On May 12 these year 32 people reached the summit of Everest.

La troppa

generalizzazione causata dalla presenza dei numeri non ha permesso il riconoscimento dell'errore. A 46 year old man has

walking home after visiting friends.

A 46 year old man has walking home after visiting friends.

L'algoritmo risponde bene.

has->was, killed walking->returned, left, new

Il modulo di rimpiazzamento ha trovato la giusta correzione. For the following year,

the same thing will happens.

For the following year, the same thing will happens.

L'espressione è

discretamente usata nel web, il controllore non segnala l'errore. There was a time that

people accepted double standards from Church and monarchy.

There was a time that people accepted double standards from Church and monarchy.

L'espressione è

comunemente usata nel web, il controllore non segnala l'errore, ma segnala l'errore che si era trovato nella versione corretta.

Di queste 39 frasi, 20 sono state interpretate correttamente dall’algoritmo, mentre in 19 frasi no, questo perché c'erano termini che avevano un rate ancora più basso (infatti nella versione in cui le frasi erano corrette l'algoritmo dava esattamente lo stesso errore, come nelle frasi numero 9, 31, 39) oppure perché nel quadrigramma il rate era alto. Risultava quindi che l'espressione era altamente usata nel web: nel caso fosse comunemente usata (frasi numero 2, 16, 21, 23, 25, 39) il rate si aggirava intorno al centinaio di migliaia di occorrenze; invece, nel caso in cui fosse discretamente usata (frasi numero 35, 38) il valore era attorno al migliaio. Oppure, pur trovando il quadrigramma con all'interno l'errore, effettuando il confronto tra bigrammi ha riscontrato l'errore in quello sbagliato (frasi numero 4, 27, 30). Nella frase 36, invece, l'errore non è segnalato dato che esso ha affianco dei numeri, il che porta alla loro generalizzazione e quindi a un rate degli n- grammi alto. Per quanto riguarda il risultato nel rimpiazzo delle parole errate, è riuscito ad individuare la correzione solo in 5 frasi (frasi numero 1, 10, 14, 19, 25).

6 Conclusioni e sviluppi futuri

Come si evince dai test per le frasi corrette, con l'uso dei quadrigrammi, l'algoritmo è riuscito ad interpretare correttamente il 78% delle frasi, mentre se si usano i trigrammi, nel caso di erronea interpretazione della frase da parte del sistema, si raggiunge il 100% includendo anche queste ultime. Per quanto riguarda le frasi errate, utilizzando la stessa configurazione base di quella usata nelle frasi corrette, è riuscito a individuare gli errori nel 50% delle frasi e fra queste, il modulo di rimpiazzo è riuscito a correggere l'errore nel 25% di casi. Quindi, in definitiva, possiamo dire che l'algoritmo ha dato un buon responso.

Per quanto riguarda gli sviluppi futuri si possono modificare certi aspetti. Ad esempio:

• Il fattore che un singolo termine a causa della sua poca diffusione può abbassare considerevolmente il rate degli n-grammi di livello superiore.

• Rendere il peso della normalizzazione della distanza logaritmica aggiornabile a seconda della frase che si sta elaborando; come succede in quella della normalizzazione di proporzione.

• La possibilità di cambiare il metodo di calcolo del valore finale. Anziché una semplice media tra le due normalizzazioni, dare un peso maggiore a chi tra le due ha una variabilità più alta.

• Creare un filtraggio più accurato nel modulo degli snippet.

• Nel modulo di rimpiazzo consultare più pagine e prendere magari maggiormente in considerazione le parole che abbiano in comune più lettere

7 Bibliografia

1. Davide Rafanelli, “Progettazione e realizzazione di un algoritmo per l'analisi del linguaggio naturale basata su un approccio emergente e sul Web come corpus”;

2. Franco Angeli, “Text Mining: teoria e applicazioni”; 3. Nirav Ranpara , ”Google search techniques”;

Documenti correlati