Documente Academic
Documente Profesional
Documente Cultură
Tehnologiile limbajului
Tehnologiile moderne ale limbajului i cercetarea lingvistic ne ajut n activiti zilnice:
cnd efectum cutri pe internet, cnd traducem pagini web, cnd folosim facilitile de corectare a ortografiei i gramaticii oferite de un procesor de texte, cnd dm comenzi vocale aparaturii din main sau telefonului mobil, cnd primim recomandri n librrii online, cnd urmm indicaiile unei aplicaii de navigare prin GPS.
Fraze
Solicitat s comenteze un editorial recent al lui Dinu Patriciu, n care acesta preciza c nu crede n social-liberalism i s aprecieze dac, astfel, a dat o lovitur de imagine USL, Antonescu a spus c nu tie dac Patriciu s-a referit la USL. | El a precizat c USL este o uniune social-liberal pentru c reunete un partid social-democrat cu un partid naional liberal. |
Propoziii
Solicitat s comenteze un editorial recent al lui Dinu Patriciu,| n care acesta preciza |c nu crede n social-liberalism| i s aprecieze |dac, astfel, a dat o lovitur de imagine USL,| Antonescu a spus |c nu tie |dac Patriciu s-a referit la USL.|
Uniti lexicale
Solicitat s comenteze un editorial recent al lui Dinu Patriciu , n care acesta preciza c nu crede n social-liberalism i s aprecieze dac , astfel , a dat o lovitur de imagine USL , Antonescu a spus c nu tie dac Patriciu s - a referit la USL .
Grupuri nominale
Solicitat s comenteze [un editorial recent al lui [Dinu Patriciu]], n [care] [acesta] preciza c nu crede n [social-liberalism] i s aprecieze dac, astfel, a dat [o lovitur de [imagine]] [USL], [Antonescu] a spus c nu tie dac [Patriciu] s-a referit la [USL].
organizai persoan e
Roluri semantice
Carla bought the computer from Sally for $100.
buy er
goo goo ds ds
selle r
pric pric e e
Lanuri corefereniale
Winston was just taking his place in one of the middle rows when two people whom he knew by sight, but
10
Lanuri corefereniale
Winston was just taking his place in one of the middle
rows when two people whom he knew by sight, but had never spoken to, came unexpectedly into the room. One of them was a girl whom he often passed in the corridors. He did not know her name, but he knew that she worked in the Fiction Department.
11
Lanuri corefereniale
Winston was just taking his place in one of the middle
rows when two people whom he knew by sight, but had never spoken to, came unexpectedly into the room. One of them was a girl whom he often passed in the corridors. He did not know her name, but he knew that she worked in the Fiction Department
12
Lanuri corefereniale
Winston was just taking his place in one of the middle
rows when two people whom he knew by sight, but had never spoken to, came unexpectedly into the room. One of them was a girl whom he often passed in the corridors. He did not know her name, but he knew that she worked in the Fiction Department.
13
CONTRAST
CIRCUMSTANCE
SEQUENCE
SEQUENCE
1
PURPOSE
CONCESSION
Poli i declanatori
Referenialitate: coref
Ion a ntlnit-o pe Maria pe prtia de ski. El fcea ski iar ea plac.
antecede nt
anafor
Poli i declanatori
Referenialitate: coref
Ion a ntlnit-o pe Maria pe prtia de ski. El fcea ski iar ea plac.
antecede nt
anafor
Poli i declanatori
Referenialitate: coref
Ion a ntlnit-o pe Maria pe prtia de ski. El fcea ski iar ea plac.
antecede nt
anafor
Poli i declanatori
Rudenie: parent-of
mama Mariei
declanat or
destinai e surs
Poli i declanatori
Afeciune: love
Ion o iubete pe Maria.
declanat or surs
destinai e
Poli i declanatori
Social: superior-of
Ion s-a ntlnit cu eful lui la o bere.
declanat or surs
destinai e
Cursuri 5-6
Proiectul: MappingBooks Let me jump in the book!
Relations
Anaphoric Non-anaphoric:
kinship affection social
Kinship relations
parent-of, child-of (inverse) grandparent-of, grandchild-of (inverse) sibling (symmetrical) ant-uncle-of, nephew-of (inverse relations) cousin-of (symmetrical) spouse-of (symmetrical unknown
SpeD Cluj-Napoca, 15-17
Affective relations
friend-of, enemy-of (inverse) love, hate (inverse) has-fear-of worship
Social relations
inferior-of, superior-of (inverse) colleague-with
In case of non-referential:
from source towards destination
Non-imbricated:
referential:
the anaphor is to the right of the antecedent
non-referential:
from source to destination, as the trigger reads
antecede nt
anafor
antecede nt
anafor
trigge r
destinati on
trigge r
source
trigge r
source
destinati on
Entities
Petroniu
Vinicius was
the son of his oldest sister , who years before had married his father , a man of consular dignity from the time of Tiberius .
SpeD Cluj-Napoca, 15-17
Vinicius was
the son of his oldest sister , who years before had married his father , a man of consular dignity from the time of Tiberius .
SpeD Cluj-Napoca, 15-17
Vinicius was
the son of his oldest sister , who years before had married his father , a man of consular dignity from the time of Tiberius .
SpeD Cluj-Napoca, 15-17
Vinicius was
the son of his oldest sister , who years before had married his father , a man of consular dignity from the time of Tiberius .
SpeD Cluj-Napoca, 15-17
Vinicius was
the son of his oldest sister , who years before had married his father , a man of consular dignity from the time of Tiberius .
SpeD Cluj-Napoca, 15-17
Vinicius was
the son of his oldest sister , who years before had married his father , a man of consular dignity from the time of Tiberius .
SpeD Cluj-Napoca, 15-17
Vinicius was
the son of his oldest sister , who years before had married his father , a man of consular dignity from the time of Tiberius .
SpeD Cluj-Napoca, 15-17
Vinicius was
the son of his oldest sister , who years before had married his father , a man of consular dignity from the time of Tiberius .
SpeD Cluj-Napoca, 15-17
Vinicius was
the son of his oldest sister , who years before had married his father , a man of consular dignity from the time of Tiberius .
SpeD Cluj-Napoca, 15-17
Vinicius was
the son of his oldest sister , who years before had married his father ,
Curs 7
Probleme de IA i rezolvarea lor
45
Misionarii i canibalii
formulat ca o instan de problem
Generarea frazelor
formulat ca o problem
Maimua i banana
formulat ca o instan de problem
Alte exemple:
jocul de ah condusul mainii...
47
Cutarea soluiei
Algoritmi i euristici de cutare n spaiul strilor
Strategii irevocabile
ascensional (hill-climbing)
Strategii tentative
ascensional cu revenire (backtracking)
49
Curs 8
Jocuri
Regulile de joc
Doi juctori: MAX i MIN Fiecare are ca obiectiv ctigarea jocului Doar unul poate ctiga n modelarea iniial nu intervine ansa
dar ea poate fi simulat
Exemple:
ah checkers tic-tac-toe ...
Jocul tic-tac-toe
MAX joac cu X-uri MIN joac cu O-uri
Jocul tic-tac-toe
MAX
Remiz!
Jocul tic-tac-toe
MAX ctig
Reprezentarea ca o problem de IA
1. Problem versus instan 2. Spaiul strilor:
o stare: poziia pe tabla a semnelor ntre dou mutri dimensiunea spaiului: < 9+8.9+7.8.9++9! < 9.9!
Arborele de joc
MA X
o clas de simetrie
Arborele de joc
MA X MIN
Arborele de joc
MA X MIN
Arborele de joc
MA X MIN
Arborele de joc
MA X MIN
O stare este mai bun dac deschide mai multe posibiliti de ctig pn la sfritul jocului.
Un exemplu de funcie de evaluare: valoarea strii este diferena dintre numrul de linii pe care le mai poate completa MAX i cele pe care le mai poate completa MIN.
8 7 6 5 4 3 2 1
O stare este mai bun dac deschide mai multe posibiliti de ctig pn la sfritul jocului.
Un exemplu de funcie de evaluare: valoarea strii este diferena dintre numrul de linii pe care le mai poate completa MAX i cele pe care le mai poate completa MIN.
8 - 5 4 = 3 3 2 1
O stare este mai bun dac deschide mai multe posibiliti de ctig pn la sfritul jocului.
3 0 = 3
2 - 1 3 = -1 2
MIN
0 -1 1 0
O dezvoltare a spaiului de joc pe o adncime de 2 duce la concluzia c juctorul care joac primul are o ans de ctig n plus dac ocup centrul
1
MA X MIN
1 2
0 -1 1 0
-1
MAX gndete: MIN alege mutarea cea mai bun pentru el = cea mai proast pentru mine
0 -2 -1 0
Metoda MIN-MAX
function min-max(state, player, depth) begin if (depth = 0) then return score(state); val = worst(player); while (mai sunt stri de generat) begin generez o stare -> s; val <- back-up-compare(val, min-max(s, not(player), depth-1), player); // urmtoarea micare micoreaz spaiul de cutare n cazul n care se obine poziia de ctig ntr-una // din strile generate: if (val = -worst(player)) return(val); end return(val); end function worst(player) begin if player = MAX then return - ; else return + ; end funtion back-up-compare(val1, val2, player) begin if player = MAX then return max(val1, val2); else return min(val1, val2); end
1 0 -1 1
MA X
0
MIN
val=-1; player = MAX; depth=1; while (mai sunt stri de generat) begin
generez o stare -> s; ... end
1 0 -1 1
MA X
,MIN,1)
min-max(
val=-1; player = MAX; depth=2; while (mai sunt stri de generat) begin
generez o stare -> s; val <- back-up-compare(val, min-max(s, not(player), depth-1), player); if (val = -worst(player)) return(val); end
MIN
1 0 -1 1
s
0
MA X MIN
1
0
min-max(
,MIN,1)
val= val = worst(player); while (mai sunt stri de generat) begin generez o stare -> s; val <- back-up-compare(val, min-max(s, not(player), depth-1), player); if (val = -worst(player)) return(val); end
1 0 -1 1
s
0
MA X MIN
-1
0
min-max( ,MAX,0)
if (depth = 0) then return score(state);
-1
1 0 -1 1
s
0
MA X MIN
-1
0 -2 -1
-1
1 0 -1 1
s
0
MA X MIN
-1
0 -2 -1
-1
-2
1 0 -1 1
s
0
MA X MIN
-1
0 -2 -1
-1
-2
1 0 -1 1
s
0
MA X MIN
-1
0 -2 -1
-1
-2
Metoda alpha-beta
-1 -1
-1 1
MA Un moment din X
dezvoltarea arborelui n care apare o situaie particular:
0 -1 1 0
MIN
Generarea poate fi oprit!
Ea nu mai poate influena valoarea nodului rdcin!
-1
Metoda alpha-beta
1 -1 -2 -1
MA X MIN
2
0 -1 1 0
-1
0 -2 -1 0
Metoda alpha-beta
function alpha-beta(state, player, depth) begin if (depth = 0) then return score(state); val = worst(player); while (mai sunt stri de generat) begin generez o stare -> s; newval <- alpha-beta(s, not(player), depth-1); if player=MAX & newval val then return(newval); else if player=MIN & newval val then return(newval); else val back-up-compare(val, min-max(s, not(player), depth-1), player); // urmtoarea micare micoreaz spaiul de cutare n cazul n care se obine poziia de ctig // ntr-una din strile generate: if (val = -worst(player)) return(val); end return(val); end function worst(player) begin if player = MAX then return - ; else return + ; end function back-up-compare(val1, val2, player) begin if player = MAX then return max(val1, val2); else return min(val1, val2); end
Apelul:
alpha-beta (
,MAX,2)
Curs 11
Reprezentarea cunoaterii prin reele semantice evenimeniale
dou niveluri:
conceptual (intensiv): concepte (tipuri) referenial (extensiv): instane ale conceptelor
Reprezentri evenimeniale
Ion a spat asear gradina cu hrleul.
persoan a spa grdin
hrle Ion
ISA
ISA hrle1
ISA AG
ISA OB grdina1
INSTR
ev1
TMP
asear
repede
MOD
a atinge AG ISA AG X-obiect a lovi REC Y-obiect X-obiect AG fragil ATR
REC
REC
Z-obiect ON
ON a se revrsa Y-lichid REC cause a se revrsa REC FROM
a fi ntins
t0
ev1 C
timp
repede
MOD
a atinge AG ISA AG X-obiect a lovi REC Y-obiect X-obiect AG fragil ATR
REC
REC
Z-obiect ON
ON a se revrsa Y-lichid REC cause a se revrsa REC FROM
a fi ntins
t0
ev1 C ev2
timp
repede
MOD
a atinge AG ISA AG X-obiect a lovi REC Y-obiect X-obiect AG fragil ATR
REC
REC
Z-obiect ON
ON a se revrsa Y-lichid REC cause a se revrsa REC FROM
a fi ntins
t0
ev1 C ev2 ev3
t3
timp
lichid
repede
MOD
a atinge AG ISA AG X-obiect a lovi REC Y-obiect X-obiect AG fragil ATR
REC
REC
Z-obiect ON
ON a se revrsa Y-lichid REC cause a se revrsa REC FROM
a fi ntins
t0
ev1 C ev2 ev3
t3
timp
repede
MOD
a atinge AG ISA AG X-obiect a lovi REC Y-obiect X-obiect AG fragil ATR
REC
REC
Z-obiect ON
ON a se revrsa Y-lichid REC cause a se revrsa REC FROM
a fi ntins
t0
ev1 C ev2 ev3
t3
ev4
timp
ev4
repede
MOD
a atinge AG ISA AG X-obiect a lovi REC Y-obiect X-obiect AG fragil ATR
REC
REC
Z-obiect ON
ON a se revrsa Y-lichid REC cause a se revrsa REC FROM
a fi ntins
t0
ev1 C ev2 ev3
t3
ev4 ev5
timp
repede
MOD
a atinge AG ISA AG X-obiect a lovi REC Y-obiect X-obiect AG fragil ATR
REC
REC
Z-obiect ON
ON a se revrsa Y-lichid REC cause a se revrsa REC FROM
a fi ntins
t0
ev1 C ev2 ev3
t3
ev4
t6
ev5 ev6
timp
ISA
X-persoan
ISA Y-lichid
AG OB vedea
REC
AG
AG
plausible
a fi ntins
murdar
ISA
X-persoan
ISA Y-lichid
AG OB vedea
REC
AG
AG
plausible
a fi ntins
murdar
t0
ev1 C ev2 ev3
t3
ev4
t6
ev5 ev6 ev7
timp
crede
HAS-PROP
murdar
t0
ev1 C ev2 ev3
t3
ev4
t6
ev5 ev6 ev7
t8
ev8
timp
crede
HAS-PROP
murdar
ISA AG ev8
OB
pardoseala
ISA
X-persoan
ISA Y-lichid
AG OB vedea
REC
AG
AG
plausible
a fi ntins
murdar
t0
ev1 C ev2 ev3
t3
ev4
t6
ev5 ev6 ev7
t8
ev9 ev8
timp
matching
a fi ntins
crede
ISA ISA Maria PART-OF OB mn-1 ou-1 ISA mn fragil lichid-1 ISA lichid ?? ATR CONTAINS X-obiect ISA REC ON X-obiect ev6 AG ev7 ISA
HAS-PROP
murdar
Se potrivesc!
ISA
OB
OB HAS-PROP
pardoseala
pardoseala
murdar
t0
ev1 C ev2 ev3
t3
ev4
t6
ev5 ev6 ev7
t8
ev9 ev8
timp
crede
ev4
HAS-PROP
nelegem...
ISA
OB
OB HAS-PROP
pardoseala
pardoseala
murdar