1 / 10

Web Search Engine D esign

Web Search Engine D esign. 컴공 20001148 김보현 KLE lab. Sequence Diagram. Class Design. 역할 : 1. Web crawler 가 모아온 문서를 입력으로 받아서 2-gram term 으로 parsing 하고 DB 에 저장 2. 각각의 term 에 대해 IDF(Inverse Document Frequency) 와 Document weight 을 계산하여 table 에 저장하도록 시킴 3. 각 문서의 Rank 를 갱신하도록 시킴.

Download Presentation

Web Search Engine D esign

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. Web Search Engine Design 컴공 20001148 김보현 KLE lab

  2. Sequence Diagram

  3. Class Design 역할: 1. Web crawler가 모아온 문서를 입력으로 받아서 2-gram term으로 parsing하고 DB에 저장 2. 각각의 term에 대해 IDF(Inverse Document Frequency) 와 Document weight을 계산하여 table에 저장하도록 시킴 3. 각 문서의 Rank를 갱신하도록 시킴 Methods: 1. MakeBigram : Bigram class의 AddDoc, Parce, GetBigram 함수를 차례로 호출 2. UpdateTerm : Term table에 term과 DocID 삽입 3. UpdateIDF : IDF table을 idf와 DocID 삽입 4. UpdateDocWeight : DocWeight table에 DocId와 TermId, weight 삽입 5. UpdateRank : Rank table에 DocId와 rank값 삽입

  4. Class Design • 역할: • 1. string을 2-gram으로 parsing • 2. Parsing하다가 hyper link가 나오면 • link table update • 3. 주어진 index에 대한 bigram을 return Methods: 1. AddDoc : 해당 file을 string 단위로 읽어서 AddString 함수 호출 2. AddString : 주어진 string을 Rawdata에 추가 3. Parse : Rawdata를 2음절 단위로 잘라서 StrippedData에 저장 4. GetBigram : 주어진 index 위치의 StrippedData return 5. UpdateLink : parsing 도중 link가 나오면 DBManager의 AddLink 함수 호출

  5. Class Design • 역할: • Database와 직접 통신하면서 Table들을 관리 • 총 5개의 Table을 update하는 함수들을 가짐 • DocId와 weight을 가지는 DocInfo 관리 • Document의 link 정보를 가지고 Rank 계산 Methods: UpdateTermTable : DocId, TermId, Term을 table에 삽입 UpdateIDFTable : Term table의 정보를 가지고 idf를 계산하고 table에 삽입 UpdateDocWeightTable : Term table과 IDF table의 정보를 가지고 DocWeight을 계산하고 table에 삽입 GetDocInfo : 주어진 index를 가지고 몇번째 document의 DocInfo를 반환 GetDocNum : 전체 document 개수를 반환 UpdateLinkTable : DocId와 LinkURL, LinkDocId를 table에 삽입 UpdateRankTable : DocId와 Rank를 table에 삽입

  6. Database

  7. Class Design • 역할: • 사용자로부터 query를 입력받아서 2-gram으로 분해한다 • query weight을 계산한다 • document weight과 query weight으로 similarity를 계산한다. • rank와 similarity를 가지고 결과에 포함될 문서를 결정한다. • Methods: • AccpetQuery : 사용자가 입력한 query를 string으로 받음 • MakeBigram : Bigram class의 AddDoc, Parce, GetBigram 함수를 차례로 호출 • CalQueryWeight : query string의 weight을 계산 • CalSimilarity : 문서 weight과 query weight을 가지고 문서의 similarity를 계산 • DecideRelevantSet : similarity와 rank를 가지고 relevant set 포함 여부를 결정

  8. Data Types DocId와 DocWeight을 포함하는 Datatype DocInfo와 Similarity를 포함하는 Datatype DocId와 DocSim, DocRank를 포함하는 Set (검색 결과에 들어가는 문서들을 저장하기 위한 것)

  9. Relevance Feedback (cont’d) • query expansion 1. Represent the query in the concept space: ☞ define the inverse term frequency : ☞ term vector : ☞ weight : ☞ the relationship between two terms : ☞ the query vector :

  10. Relevance Feedback 2. Compute a similarity between each term kv correlated to the query terms and the whole query q 3. Expand the query with the top r ranked terms according to sim(q,kv ) ☞ To each expansion term kv in the query q’ 4. 구현 ☞ DBManager class에 RefineDocWeight 함수 추가 ☞ Retriever class에 RefineQueryWeight, RefineSimilarity 함수 추가 ☞ 새로운 weight과 similarity를 가지고 다시 결과를 구한다

More Related