1 / 29

הרצאה מספר 9

הרצאה מספר 9. שיטות חיפוש - חלק א'. שיטות חיפוש נפוצות. השיטה הבוליאנית ה vector-space model שיטות הסתברותיות שיטות נוספות שילוב שתי השיטות הראשונות Latent semantic indexing …. השיטה הבוליאנית.

ziv
Download Presentation

הרצאה מספר 9

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. הרצאה מספר 9 שיטות חיפוש - חלק א'

  2. שיטות חיפוש נפוצות • השיטה הבוליאנית • ה vector-space model • שיטות הסתברותיות • שיטות נוספות • שילוב שתי השיטות הראשונות • Latent semantic indexing • …

  3. השיטה הבוליאנית “Boolean search commands have been used by professionals for searching through traditional databases for years. Despite this, they are overkill for the average web user.” Danny Sullivan, http://searchenginewatch.com/facts/boolean.html • האופרטורים הבסיסיים • AND • OR • NOT

  4. דיאגרמות Venn A AND B AND NOT C4 A OR B AND NOT C (A OR B) AND NOT C

  5. חיפוש בוליאני (המשך) • אופרטורים נוספים • XOR A XOR B

  6. חיפוש בוליאני (המשך) • שימו לב: מערכות מסחריות לא תמיד מתחשבות בחוקי הקדימות (1.NOT 2. AND 3. OR), במיוחד כאשר מכניסים את השאילתא באמצעות טופס (form). לעתים קרובות הביצוע הוא משמאל לימין. • דוגמה • OCLC’s FirstSearch –expert search math OR “distance education” AND Web math OR (“distance education” AND Web) • ב advanced search אין אפשרות להוסיף סוגריים! כדי לקבל תשובה לשאילתא השנייה צריך לשנות את סדר הכנסת המונחים: 1) “distance education” 2) Web 3) math (עם הוספת האופרטורים המתאימים). • Yahoo עובד נכון עם פעולות בוליאניות

  7. חסרונות השיטה • האחזור מבוסס על החלטה בינארית (מסמך מתאים/לא מתאים) ואין אפשרות להתאמה חלקית • המסמכים המוחזרים אינם מדורגים • משתמשי הקצה • מתקשים בניסוח שאילתות בוליאניות מורכבות • השאילתות המנוסחות לעתים קרובות יותר מדי פשטניות • כתוצאה מכך מקבלים מעט מדי או יותר מדי תוצאות

  8. הvector space model • בשיטה זו ניתן לתת משקלות למונחים • השיטה מבוססת על חישובי דמיון (similarity) בין השאילתה למסמכים במאגר • השיטה מאפשרת להחזיר מסמכים עם התאמה חלקית • תוצאות החיפוש מדורגות לפי דרגת הדמיון • בשיטה זו כל מסמך וכל שאילתה מיוצגים על ידי וקטור • וקטור הוא סדרה של ערכים: v=(v1,v2,v3,….vn) – n וקטור באורך • ניתן לייחס לוקטור גם משמעות גיאומטרית – במקרה זה הערכים viהם קואורדינטות במרחב n ממדי

  9. הגדרות • ki is an index term • dj is a document • t is the total number of terms in the system • K = (k1, k2, …, kt) is the set of all index terms • wij >= 0 is a weight associated with(ki,dj). It quantifies the importance of the term ki for describing the document contents • wij = 0 indicates that term does not belong to doc • vec(dj) = (w1j, w2j, …, wtj) is a weighted vector associated with the document dj • vec(q) = (w1q, w2q, ..., wtq) is a weighted vector associated with the query q, wiqquantifies the importance of the term ki for the query

  10. דמיון בין מסמך לשאילתא • נניח שבמערכת שלנו שלושה מונחי מפתח בלבד, k1, k2, k3. • המסמך הראשון ממופתח על ידי שני המונחים, k1 ו k2והמסמך השני על ידי k1 בלבד. נגדיר מערכת משקלות פשוטה ביותר, אם מסמך ממופתח על ידי המונח, משקלו של המונח יהיה 1, אחרת 0 (זה כבר נובע מההגדרה). כלומר vec(d1)=(1,1,0) vec(d2)=(1,0,0) • נניח vec(q)=(0,1,1) • ניתן לחשב את הדמיון (similarity)בין השאילתה למסמך על ידי חישוב המכפלה הפנימית בין הוקטורים (הכפלת הקואורדינטות המתאימות וחיבור התוצאות). נסמן את הערך ב sim(di,q) sim(d1,q)=0*1+1*1+ 1*0=1 sim (d2,q)=0*1+1*0 + 1*0=0

  11. k1 - powerful k2 - fast d7 d6 d2 d4 d5 d3 d1 k3 - efficient d1: Computers are powerful and efficient.d2: Computers are powerful.d3: Computers are efficient and very fast.d4: Computers are very powerful.d5: Computers are powerful, fast and efficient.d6: Computers are very fast and powerful.d7: Computers are fast. נקבע משקלות. אם מונח מופיע במסמך, משקלו יהיה אחד, אחרת משקלו יהיה 0:

  12. k1 - powerful k2 - fast d7 d6 d2 d4 d5 d3 d1 k3 - efficient · k1 k2 k3 q dj d1 9 3 0 2 d2 3 3 0 0 d3 17 0 4 3 d4 6 6 0 0 d5 10 3 2 1 d6 14 2 6 0 d7 6 0 3 0 q 1 2 3 d1: Computers are powerful and efficient.d2: Computers are powerful.d3: Computers are efficient and very fast.d4: Computers are very powerful.d5: Computers are powerful, fast and efficient.d6: Computers are very fast and powerful.d7: Computers are fast. משקל: נותנים חשיבות לסדר הופעת המונחים ולמילה very. הכלל: מונח ראשון – משקל 3, מונח שני – משקל 2, מונח שלישי לפי סדר ההופעה – משקל 1. המילה veryמכפילה את המשקל שהיינו נותנים המונח.

  13. מתן משקלות • במערכות קלאסיות נהוג להתחשב בשני גורמים: • שכיחות הופעת המונח במסמך (term frequency - tf). נהוג לנרמל גודל זה, כדי להתחשב במסמכים בעלי אורכים שווים. • השוו בין מסמך בן 10000 מילים ומסמך בן 10 מילים – בשניהם מופיע מונח מסויים פעמיים • נדירות הופעת המונח במסמכי המערכת. ככל שמונח נדיר יותר, הופעתו במסמך משמעותי יותר (יחס הפוך). גורם זה נקרא inverse document frequency (idf).

  14. מתן משקלות(הגדרות) • Let, • N be the total number of docs in the collection • ni be the number of docs which contain ki • freq(i,j) raw frequency of ki within dj • A normalized tf factor is given by • f(i,j) = freq(i,j) / max(freq(l,j)) • where the maximum is computed over all terms which occur within the document dj • There are other ways to normalize (e.g simply by the length of the document) • The idf factor is computed as • idf(i) = log (N/ni) • the log is used to make the values of tf and idf comparable. It can also be interpreted as the amount of information associated with the term ki. log is to the base 2.

  15. משקלות (המשך) • השיטות הטובות ביותר מבוססות על שני הגדלים הנ"ל • wij = f(i,j) * log(N/ni) • שיטה זו נקראיתtf-idf weighting scheme • ניתן לתת משקלות גם למונחי השאילתה. הצעה אחת: • wiq = (0.5 + [0.5 * freq(i,q) / max(freq(l,q)]) * log(N/ni) • הניסיון מראה ששיטות אלה משיגות תוצאות טובות עבור אוספים כלליים. • נבדוק את שיטות הדירוג של ERIC • Israel "information retrieval"http://searcheric.org

  16. השיטה ההסתברותית • בשיטה זו מחשבים את הדמיון בין השאילתה למסמך לפי ההסתברות הרלוונטיות של המסמך לשאילתה. • הנחת היסוד • קיימת קבוצה של מסמכים ideal set) ) שהיא קבוצת המסמכים שהמשתמש היה רוצה לקבל כתוצאה של השאילתה. מסמכים בקבוצה זו רלוונטיים ומסמכים מחוץ לקבוצה אינם רלוונטיים. • מבוסס על חישוב הסיכוי שמונח יופיע במסמך רלוונטי. הדמיון הוא צירוף ההסתברויות הנ"ל עבור המונחים המשותפים למסמך ולשאילתה. • השיטה מתבססת על תיאוריות מתמטיות קיימות(תורת ההסתברות).

  17. ( ) ( ) r R - r n - r N - R השיטה ההסתברותית (המשך) המשקל אמור לבטא את הסיכוי שהמונח יופיע במסמך שרלוונטי לשאילתה. לדוגמה: N number of documents in collection R number of relevant documents for query q n number of documents with term t r number of relevant documents with term t w = log r R - r n - r N - R number of relevant documents with term t number of relevant documents without term t ( ) ( ) number of non-relevant documents with term t number of non-relevant documents in collection חסרונות: צריך "לנחש" את R ו r .אין התחשבות בשכיחות המונח במסמך. הנחת אי תלות הופעת מונחים במסמכים (מניחים גם ב (vector space.

  18. עיבוד שפה טבעית - NLP • המשתמש מנסח את השאילתה שלו בשפה טבעית. • מעודדים את המשתמש לתת תיאור מפורט • אחת הבעיות • זיהוי שלילה • טיפול בשאילתות המורכבות מקטעי משפטים בלבד (sentence fragments). • דוגמה לשירות כזה ב Web: askjeeves http://www.askjeeves.com Tell me about UN resolutions against Iraq Who killed Rabin? What countries in Europe are not members of the EU? ננסה את השאילתות המקבילות ב Google: "UN resolutions" "against Iraq“ Rabin killed countries Europe not members EU

  19. שיטות נוספות • שילוב בשיטה הבוליאנית עם ה vector space • מדרגים את התוצאות שהתקבלו באחזור הבוליאני • latent semantic indexing • מנסה למפתח מושגים (concepts)במקום מונחי מפתח

  20. דירוג התוצאות • term frequency • inverse document frequency • מיקום המונח במסמך • קרבה בין המונחים • קשרי hypertext

  21. שיטות לדירוג התוצאות (המשך) • שכיחות המונח בטקסט • ב Web מנסים לנצל את הגורם הזה לרעה.התופעה נקראת spamming, מנועי החיפוש לנסים להלחם בה. • יש יתרון למסמכים ארוכים על פני מסמכים קצרים (על בעיה זו ניתן להתגבר על ידי נירמול) • ישנם סוגי מסמכים (חוזים לדוגמה) בהם שיטה זו לא תעבוד. למרות זאת, הניסיון מראה, שהשיטה בדרך כלל עובדת כאשר מתעלמים מהמונחים השכיחים ביותר.

  22. שיטות לדירוג התוצאות (המשך) • idf - inverse document frequency • מדגיש את חשיבות המילים הנדירות בשאילתה • בשאילתה של מונח יחיד לא תורם כלום(יש המון שאילתות כאלה ב Web) • קשה לחישוב באוסף דינמי – כל שינוי (הוספה, מחיקה או שינוי תוכן המסמך) גורם לשינוי בערכי ה idf. פתרונות אפשריים • לצבור את השינויים "בצד". לבנות מחדש את האינדקס אחת לתקופה קבועה. באינדקס רשום גם ה tf וגם ה idf • לבנות את האינדקס מחדש כאשר מצטברת כמות מעל לכמות סף של שינויים • לרשום בקובץ האינדקס את ה tf בלבד (קל לעדכון) ולחשב את ה idf בכל פעם מחדש.

  23. שיטות לדירוג התוצאות (המשך) • מיקום המונח במסמך • מונח המופיע בכותר (מהו הכותר במסמך Web?) • מונח המופיע בתחילת המסמך (מה קורה עם ציטוטים במאמרים מדעיים?) • מונחים מודגשים או מוצגים ב fontגדול • גורמים אלה משפיעים על AltaVista (מתוך ה help(, 2002 • what you are looking for appear near the beginning of the document • the words and phrases you are looking for appear in the title of the page

  24. שיטות לדירוג התוצאות (המשך) • קרבה בין המונחים המבוקשים • נראה את המדיניות של Google (מתוך ה ,help 2002) • Not only do Google's results contain all of your search terms, but Google also analyzes the proximity of those terms within the page. Google prioritizes results according to how closely your individual search terms appear and favors results that have your search terms near each other. Google's order of hits is determined by a combination of several factors, including PageRank priorities. • Google's order of results is automatically determined by more than 100 factors, including our PageRank algorithm. Please check out our "Why Use Google" page for more details. Due to the nature of our business and our interest in protecting the integrity of our search results, this is the only information we make available to the public about our ranking system. (2003)

  25. שיטות לדירוג התוצאות (המשך) • קשרי hypertext - link analysis • כיום רוב מנועי החיפוש ב web לוקחים בחשבון את הקישורים המצביעים אל הדף לצורך הדירוג • יושם לראשונה ב Google(Page & Brin). במקביל גם אחרים (Kleinberg)פיתחו שיטות דומות. • הרעיון הבסיסי: • ככל שיש יותר linksהמצביעים אל דף מסויים, הדף "חשוב" יותר • יש קישורים "חשובים יותר " (למשל קישור מ Yahoo) ויש קישורים חשובים פחות (קישורים שאני יצרתי בעצמי כדי לשפר את מיקום הדף שלי). לכן לא ניתן סתם לספור את מספר הקישורים הנכנסים. מתחשבים גם באיכותשל הקישור

  26. שיטות לדירוג התוצאות (המשך) • מה אומרים Google ו AltaVista על הנושא? • Google's order of hits is determined by a combination of several factors, including PageRank priorities. (2002) • AltaVista: pages that have lots of links to other pages with related content are likely to be useful reference points for you (2002) • ניתן למצוא שני תחומים בהם כבר בעבר נעשה שימוש בכלים דומים ל ניתוח קישורים • ביבליומטריקה (citation analysis) • רשתות חברתיות (social networks) • לכל כלי יש את המתכון הסודי שלו לדירוג מסמכים • יש כאלה שבנוסף לגורמים שהזכרנו לעיל, מתחשבים גם במידע ה נמצא ב meta tags

  27. שיטות להצגת תוצאות האחזור • Ranking • Short summary • ב Webבדרך כלל כמה שורות ראשונות של המסמך או מה שמופיע בתגית description (metatag). • Zoning • הצגת הקטע הרלוונטי מתוך המסמך.Google משתמש בשיטה זו. • Highlighting • מילות החיפוש מודגשות במסמך המאוחזר. למשל ב cached copy של Google.

  28. שיטות להצגת תוצאות האחזור (המשך) • Vocabulary browse • למשל ב Sociological Abstracts דרך WinSpirs • Iterative search and search history log • search within results (e.g. in Google) • search history in ABI/INFORM for currrent session. Also in FirstSearch • Canned query • שמירת שאילתה החוזרת על עצמה (e.g.WOS)

More Related