Upload
miller
View
48
Download
5
Embed Size (px)
DESCRIPTION
עיבוד שפות טבעיות - שיעור שלישי ניתוח מורפולוגי. אורן גליקמן המחלקה למדעי המחשב אוניברסיטת בר אילן. בנית מנתח מורפולוגי. המטרות: Recognizer : האם מילה היא תקנית או לא Generator : מייצר מילים מניתוח מורפולוגי מסוים Parser : נותן ניתוח מורפולוגי למלים Stemmer :נותן בסיס ( stem ) של מילה - PowerPoint PPT Presentation
Citation preview
89-6801
עיבוד שפות טבעיות - שיעור שלישיניתוח מורפולוגי
אורן גליקמןהמחלקה למדעי המחשב
אוניברסיטת בר אילן
89-6802
בנית מנתח מורפולוגי
המטרות:•–Recognizerהאם מילה היא תקנית או לא :–Generatorמייצר מילים מניתוח מורפולוגי מסוים :–Parserנותן ניתוח מורפולוגי למלים :–Stemmer( נותן בסיס:stemשל מילה )
לא יעיל ולפעמים גם אי אפשר לשים בלקסיקון •את כל המילים על צורת ההטיה שלהן.
89-6803
בניית מנתח מורפולוגי...
כדי לבנות מנתח מורפולוגי יש צורך ב:•, עם מידע affixes ו-stems - רשימת שורשים לקסיקון–
הוא שם עצם, פועל וכו'.stemכללי כגון האם ה-–Morphotactics המודל לסידור המורפמות )איזו -
מורפמה היא תחילית ואיזו סופית( חוקי הכתיב orthographic rulesחוקים אורתוגרפיים –
- שינויים החלים במילה למשל - y-> ie כמו במקרה של city + -s -> cities
89-6804
Finite-State Automaton for English Nominal
Inflection
– Regular: fox, dog, city: add s– Irregular: goose, mouse, sheep (memorize)
89-6805
הטמעת המילון באוטומט
89-6806
Finite State Transducer
• To go beyond mere recognition, we need a transducer
• A transducer maps between one set of symbols and another; a finite state transducer does this via a finite automaton.
• An FST can be seen as a recognizer, generator or translator.
89-6807
Two-Level Morphology
• Two-level morphology represents a word as a correspondence between a lexical level, which represents a simple concatenation of morphemes making up a word, and the surface level, which represents the actual spelling of the final word.
89-6808
FSTs
89-6809
English Nominal Inflection FST
89-68010
FSTהוספת חוקי איות ל-
ישנם חוקי איות שהם תלויי הקשר•למשל -•
–cat + N + PL -> cats–fox + N + PL -> foxes
89-68011
“Three” level morphology
אחת לשנייה, כך FSTניתן לצרף מכונות •שהפלט של האחת היא הקלט של השנייה.
לטיפול בחוקי האיות יוצרים שלוש שכבות:•–Lexical–Intermediate–Surface
89-68012
Orthographic Rules FSTWe need an FST to add an e between an x, s or z and intermediate before the s at morpheme boundary at the end of a word.
A key point of this transducer is that irrelevant stuff passes that through unchanged.
89-68013
Composition of FSTs
• Actually running a cascade as a cascade can turn out to be a pain... – it is hard to manage all the tapes – it fails to take advantage of the restricting power of all
the machines• So... • it is better to compile the cascade into a single
large machine with two tapes )input and output(
89-68014
English Derivation
• Much more complex than inflectional• As an example, consider adjectives
– Big, bigger, biggest– Cool, cooler, coolest, coolly– Red, redder, reddest– Clear, clearer, clearest, clearly, unclear,
unclearly– Happy, happier, happiest, happily– Unhappy, unhappier, unhappiest, unhappily– Real, unreal, silly
89-68015
English Adjective Derivation
89-68016
What’s wrong?
• Accepts all adjectives above, but• Also accepts unbig, readly, realest• Common problem: over generation• Solution?• Need classes of roots that say
which can occur with which suffixes
89-68017
Revised FSA
89-68018
And it can get much more complex…
89-68019
Stemming
• Lexicon Free• The stem is not the same as the morphological
root )it is not necessarily a lexical item!(• In IR
– the key is to acquire the stems, not to make any real use of morphological structure, hence the term
– Small performance improvements in practice )if any!!!(– with larger documents, less needed – Introduces errors: e.g. organization organ
89-68020
Porter Stemmer• Example Rules:• Step 1a
– SSES -> SS (caresses caress)– IES -> I (ponies poni, ties ti)– SS -> SS (caress caress)– S (cats cat)
• Step 1b – (m>0) EED EE (feed feed, agreed agree)– (*v*) ED (plastered plaster, bled
bled) (*v*) ING (motoring motor, sing sing)
89-68021
Porter Algoritm• Step 2
– (m>0) ATIONAL -> ATE relational -> relate – (m>0) TIONAL -> TION conditional -> condition – (m>0) ENCI -> ENCE valenci -> valence – (m>0) ANCI -> ANCE hesitanci -> hesitance – (m>0) IZER -> IZE digitizer -> digitize – (m>0) ABLI -> ABLE conformabli -> conformable
(m>0) ALLI -> AL radicalli -> radical – (m>0) ENTLI -> ENT differentli -> different
• Etc…
89-68022
Human Morphological Processing
• How are multi-morphemic words represented in the minds of human speakers?
• full-listing hypothesis vs. minimum redundancy hypothesis
89-68023
Experiments
• Stanners et al. 1979: a word is recognized faster if it has been seen before (priming)– lifting lift, burned burn– selective / select– i.e. different representations for inflection and
derivation.• Marsen-Wilson et al. 1994: spoken derived
words can prime their stems, but only if their meaning is close:– government govern, – department / depart
89-68024
89-68025
Some more on Words
• Type vs. token• Word senses• How many words are there in the
following sentence: “If she is right and I am wrong then we are way over to the right of where we ought to be.”
• Zipfs Law: f 1/r
89-68026
Summary
מילים3והמשפחה: •סוכריות:מורפולוגיה• סוכריה גזירה: סוכר • סוכריות,אכלנוהטיה: סוכריה •FSTניתן למדל מורפולוגיה ע"י ••Stemming
89-68027
Homework