De presentatie wordt gedownload. Even geduld aub

De presentatie wordt gedownload. Even geduld aub

Taaltheorie en Taalverwerking Bachelor Kunstmatige Intelligentie.

Verwante presentaties


Presentatie over: "Taaltheorie en Taalverwerking Bachelor Kunstmatige Intelligentie."— Transcript van de presentatie:

1 Taaltheorie en Taalverwerking Bachelor Kunstmatige Intelligentie

2 Vorm van deze cursus: Elke week: Hoorcollege Huiswerk Werkcollege Oefenopdrachten

3 Vorm van deze cursus: Elke week: Hoorcollege (Remko Scha) Huiswerk (Prolog-opdrachten) Werkcollege (Tikitu de Jager) Oefenopdrachten

4 Vorm van deze cursus: Elke week: Hoorcollege (Remko Scha) Huiswerk (Prolog-opdrachten) Werkcollege (Tikitu de Jager) Oefenopdrachten Ingangseis: Enige vaardigheid in Prolog programmeren

5 Vorm van deze cursus: Elke week: Hoorcollege (Remko Scha) Huiswerk (Prolog-opdrachten) Werkcollege (Wouter Josemans) Oefenopdrachten Ingangseis: Enige vaardigheid in Prolog programmeren Niet: Andere vakken. Ook niet: tentamen Prolog

6 Jurafsky & Martin: Speech and Language Processing eerste editie (online: blackboard course documents) of tweede editie (te koop) [Ook een klein stukje uit: Russell & Norvig: Artificial Intelligence: a Modern Approach.]

7 Taaltheorie & Taalverwerking = Inleiding Computerlinguïstiek = Inleiding Taaltechnologie

8 Taalverwerking Cognitie Toepassingen

9 Cognitie Toepassingen: Machine Translation Information Retrieval Question Answering Taalverwerking

10 Taaltheorie (Linguïstiek)

11 Linguïstiek: Taal-analyse op verschillende niveau's: Fonetiek/Fonologie: Geluid Morfologie: Woord-structuur Lexicon: Woorden Syntax: Zins-structuur Discourse: Text

12 Syntax: Structuur Semantiek: Betekenis Pragmatiek: Gebruik Linguïstiek: Taal-analyse in verschillende dimensies:

13 Onze focus: de interpretatie van tekst. [Derdejaars-college Zeevat: Discourse] Linguïstiek & A.I.

14 Onze focus: de interpretatie van tekst. [Derdejaars-college Zeevat: Discourse] Daarom eerst: de interpretatie van zinnen. [Tweedejaars-college Scha: Natuurlijke-Taal Interfaces] Linguïstiek & A.I.

15 Onze focus: de interpretatie van tekst. [Derdejaars-college Zeevat: Discourse] Daarom eerst: de interpretatie van zinnen. [Tweedejaars-college Scha: Natuurlijke-Taal Interfaces] Daarom eerst: de structuur van zinnen. [Dit college.] Linguïstiek & A.I.

16 Inhoud van deze cursus: "Taaltheorie en Taalverwerking" = Formele Linguïstiek & Computerlinguïstiek

17 Inhoud van deze cursus: Blok a: Structuur van woorden en zinnen (morfologie en syntax): Formele Talen en Automaten Formele Grammatica's Analyse-algoritmes t.b.v. zulke grammatica's

18 Inhoud van deze cursus: Blok b: Semantiek (Betekenis) Discourse (Tekst & Dialoog) Toepassingen (b.v.: Machine Translation)

19 Formele Linguïstiek Basics Computerlinguïstiek Logica Machine Learning Advanced Computerlinguïstiek

20

21 Week 1: Formele talen en automaten. Deel 1: Reguliere Expressies & Eindige-Toestands-Automaten.

22 Theorie der Formele Talen en Automaten. Wiskunde over verzamelingen strings. Uitgevonden door: Noam Chomsky Klassiek overzichtsboek: Hopcroft & Ullman Prettig leerboek: Peter Linz

23 Theorie der Formele Talen en Automaten. String: Sequentie van discrete symbolen, afkomstig uit een gegeven "alphabet".

24 Theorie der Formele Talen en Automaten. String: Sequentie van discrete symbolen, afkomstig uit een gegeven "alphabet". Taal: Verzameling strings.

25 Theorie der Formele Talen en Automaten. String: Sequentie van discrete symbolen, afkomstig uit een gegeven "alphabet". Taal: Verzameling strings. Grammatica: Definitie van een taal.

26 Theorie der Formele Talen en Automaten. String: Sequentie van discrete symbolen, afkomstig uit een gegeven "alphabet". Taal: Verzameling strings. Grammatica: Definitie van een taal. Automaat: "Implementatie" van een grammatica.

27 Grammatica's en automaten heb je in soorten: meer of minder "krachtige". We beginnen nu met de eenvoudigste.

28 Grammatica's en automaten heb je in soorten: meer en minder "krachtige". We beginnen nu met de eenvoudigste: Reguliere Expressies & Finite State Automata

29 Grammatica's en automaten heb je in soorten: meer en minder "krachtige". We beginnen nu met de eenvoudigste: Reguliere Expressies & Finite State Automata [Volgende week: hiërarchie van verschillende soorten grammatica's en automaten.]

30 Formele talen. Neem aan: alphabet: a...z en  Talen b.v.: {ab, ad, da,  } {ab} { , ab, abab, ababab, abababab,.....} {ab, aabb, aaabbb, aaaabbbb,...}

31 Reguliere expressies: Strings: ab --> {ab} Disjunctie: (ab | bc)-->{ab, bc} Kleene Star: (ab)*--> { , ab, abab, ababab, abababab,...} Concatenatie: (ab)*c-->{c, abc, ababc, abababc,...}

32 Reguliere expressies (a | b)*c-->

33 Reguliere expressies (a | b)*c-->{c, ac, bc, aac, abc, bac, bbc,...}

34 Reguliere expressies (a | b)*c-->{c, ac, bc, aac, abc, bac, bbc,...} (a*c) | ( b*c)-->{c, ac, aac,aaac,..., bc, bb, bbbc,...}

35 Reguliere expressies in Perl e.d.: Heel veel "syntactic sugar": negatie optionaliteit minstens één [0-9], [a-z] wildcard etc.

36 Finite State Automata Ook wel genoemd: Finite State Machines, Finite Automata, Eindige-Toestands- Automaten, Eindige Automaten Ander formalisme, equivalent aan Reguliere Expressies

37 FSAs als Grafen

38 J & M: "Schapentaal": baa(a)*!

39 FSAs als Grafen J & M: "Schapentaal": baa(a)*!

40 Sheep FSA We can say the following things about this machine It has 5 states At least b,a, and ! are in its alphabet q0 is the start state q4 is an accept state It has 5 transitions

41 But note There are other machines that correspond to this language

42 More Formally: Defining an FSA We specify an FSA by enumerating the following things: The set of states: Q A finite alphabet: A A start state q 0 A set F of accepting/final states F  Q A transition function  (q,i) that maps Q x A to Q

43 Transition function can be represented by a state- transition table:

44 Recognition Recognition is the process of determining if a string is accepted by a machine It is the process of determining if a string is in the language defined by the machine

45 Recognition Start in the start state Examine the current input Consult the table Go to a new state and update the tape pointer.

46 D-Recognize

47 FSAs can be viewed from two perspectives: –Acceptors that can tell you if a string is in the language –Generators to produce all and only the strings in the language

48 Dollars and Cents

49 Non-Determinism

50 Epsilon transitions do not examine or advance the tape during recognition 

51 Equivalence Non-deterministic machines can be converted to deterministic ones That means that they have the same power; non- deterministic machines are not more powerful than deterministic ones

52 Going from Regular Expressions to FSA All regular expression operators can be implemented by combinations of concatenation, disjunction, and closure

53 So if we could just show how to turn closure/union/concat from regexps to FSAs, this would give an idea of how FSA compilation works. Take any regular expression and build an automaton Intuition: induction Base case: build an automaton for single symbol (say ‘a’) Inductive step: Show how to imitate the 3 regexp operations in automata

54 Disjunction Accept a string in either of two languages

55 Concatenation Accept a string consisting of a string from language L1 followed by a string from language L2.

56 Closure Verbind de eindtoestanden met de begintoestand met een epsilon-arc.

57 Opgaven Wekelijks per email verzenden aan wbeek@science.uva.nl met cc aan scha@uva.nl Vermeld in de subject-heading: "TTTV". Gezamenlijke inzending door groepjes van twee personen wordt toegestaan en zelfs aangemoedigd.

58 Eindcijfer Eindcijfer is het gemiddelde van het gemiddelde cijfer van alle opdrachten en het cijfer van het tentamen, met dien verstande dat beide voldoende moeten zijn. Er is een tussentoets in week 8.

59 http://iaaa.nl/TTTV/

60


Download ppt "Taaltheorie en Taalverwerking Bachelor Kunstmatige Intelligentie."

Verwante presentaties


Ads door Google