COMP6714 ASSIGNMENT
ASSIGNMENT
项目类别:计算机

Hello, dear friend, you can consult us at any time if you have any questions, add  WeChat:  zz-x2580


   COMP6714 ASSIGNMENT

Q1. (25 marks)

Some Boolean retrieval systems (e.g., Westlaw) support the proximity operator /S, which

restricts the occurrences matches to be within the same sentence.

Assume that we have created an additional positional list for $, which records the positions

of the end of the sentences. E.g., for the document

A B C. D E.

the position list for $ is [4, 7].

You are required to engine an algorithm to support the query A /S B. To make the task

easier, we further constrain the semantics of the query to satisfy both conditions:

? the occurrences of A and B must be within the same sentence.

? the occurrence of A must precede that of B.

For example, the above example document matches the query A /S C, but not C /S A.

You need to

? make simple modifications to the pseudocode shown in Algorithm 1, which is exactly

the algorithm in Figure 2.12 in the textbook. Note that we modify the

algorithm slightly so that array indexes start from 1 instead of 0. Specifically,

– you need to insert some code between Lines 6 and 7, and perform some modifications

to some lines afterwards.

– In your submitted algorithm pseudocode (named Q1(p1, p2, p$

)), clearly mark

the modifications using color or boxes.

? You can assume that there is a function skipTo(p, docID, pos), which move the

cursor of list p to the first position such that (1) the position belongs to a document

docID, and (2) the position is no smaller than pos.

留学ICU™️ 留学生辅助指导品牌
在线客服 7*24 全天为您提供咨询服务
咨询电话(全球): +86 17530857517
客服QQ:2405269519
微信咨询:zz-x2580
关于我们
微信订阅号
© 2012-2021 ABC网站 站点地图:Google Sitemap | 服务条款 | 隐私政策
提示:ABC网站所开展服务及提供的文稿基于客户所提供资料,客户可用于研究目的等方面,本机构不鼓励、不提倡任何学术欺诈行为。