-
Notifications
You must be signed in to change notification settings - Fork 0
/
搜索引擎.h
55 lines (50 loc) · 961 Bytes
/
搜索引擎.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#include<iostream>
#include<conio.h>
#include<fstream>
#include<string>
#include"单词编号_临时索引.h"
using namespace std;
class Word
{
public:
Word()
{
this->next = NULL;
this->nets = NULL;
}
Word(string A)
{
this->word = A;
this->next = NULL;
this->nets = NULL;
}
string word;
Word* next;
int* nets;
};
class Search_Engine
{
public:
Search_Engine();
Word* wordsrear; //搜查序列
Word* wordshead;
ifstream file;
Word_List* word_list;
int dictionary_count;
int* dictionary; //词典索引
unsigned long long int* wordcount; //倒排索引单词对应网页数目,用于计算偏移地址
int* net_count;
int* net; //打印
int net_total; //网页总数
int word_count; //分词个数
unsigned int* ptr; //网页地址
queue<int>*sort_bucket;
queue<pair<pair<int,int>,int>>key; //映射码
void Words_Analyse(); //分析表
void Search_Word();
void Search_Net();
void Net_Sort();
void Search_Link();
void Search_Main();
};