File size: 7,992 Bytes
2903edf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3GPP & ETSI Document Finder</title>
    <link rel="stylesheet" href="/static/style.css">
</head>
<body>
    <div class="app-container">
        <!-- Header -->
        <header class="header">
            <div class="header-content">
                <h1 class="logo">3GPP & ETSI Document Finder</h1>
                <div class="header-stats" id="header-stats">
                    <span class="stat-item">Ready</span>
                </div>
            </div>
        </header>

        <!-- Main Content -->
        <main class="main-content">
            <!-- Search Tabs -->
            <div class="search-tabs">
                <button class="tab-button active" data-mode="single">Single Document</button>
                <button class="tab-button" data-mode="batch">Batch Search</button>
                <button class="tab-button" data-mode="keyword">Keyword Search</button>
                <button class="tab-button" data-mode="bm25">BM25 Search</button>
            </div>

            <!-- Search Forms -->
            <div class="search-container">
                <!-- Single Document Search -->
                <div class="search-form active" id="single-form">
                    <div class="form-group">
                        <label for="doc-id">Document ID</label>
                        <div class="input-group">
                            <input type="text" id="doc-id" placeholder="e.g., 23.401, S1-123456, SET(24)123">
                            <button class="btn btn-primary" onclick="searchSingle()">Search</button>
                        </div>
                    </div>
                </div>

                <!-- Batch Search -->
                <div class="search-form" id="batch-form">
                    <div class="form-group">
                        <label for="batch-ids">List of IDs (one per line)</label>
                        <textarea id="batch-ids" placeholder="23.401&#10;S1-123456&#10;103 666" rows="6"></textarea>
                        <button class="btn btn-primary" onclick="searchBatch()">Search Batch</button>
                    </div>
                </div>

                <!-- Keyword Search -->
                <div class="search-form" id="keyword-form">
                    <div class="form-group">
                        <label for="keywords">Keywords</label>
                        <input type="text" id="keywords" placeholder="e.g., 5G NR,authentication">
                    </div>
                    
                    <div class="filters-container">
                        <div class="filter-group">
                            <label>Source</label>
                            <select id="source-filter">
                                <option value="all">All Sources</option>
                                <option value="3GPP">3GPP Only</option>
                                <option value="ETSI">ETSI Only</option>
                            </select>
                        </div>
                        
                        <div class="filter-group">
                            <label>Search Mode</label>
                            <select id="search-mode-filter">
                                <option value="quick">Quick Search</option>
                                <option value="deep">Deep Search</option>
                            </select>
                        </div>
                        
                        <div class="filter-group">
                            <label>Logic</label>
                            <select id="mode-filter">
                                <option value="and">AND (all words)</option>
                                <option value="or">OR (any word)</option>
                            </select>
                        </div>
                        
                        <div class="filter-group">
                            <label>Specification Type</label>
                            <select id="spec-type-filter">
                                <option value="">All Types</option>
                                <option value="TS">TS (Technical Specification)</option>
                                <option value="TR">TR (Technical Report)</option>
                            </select>
                        </div>
                        
                        <div class="checkbox-group">
                            <label class="checkbox-label">
                                <input type="checkbox" id="case-sensitive-filter">
                                <span class="checkmark"></span>
                                Case Sensitive
                            </label>
                        </div>
                    </div>
                    
                    <button class="btn btn-primary" onclick="searchKeyword()">Search</button>
                </div>

                <!-- BM25 Search -->
                <div class="search-form" id="bm25-form">
                    <div class="form-group">
                        <label for="bm25-keywords">Search Query</label>
                        <input type="text" id="bm25-keywords" placeholder="e.g., 5G authentication procedures">
                    </div>
                    
                    <div class="filters-container">
                        <div class="filter-group">
                            <label>Source</label>
                            <select id="bm25-source-filter">
                                <option value="all">All Sources</option>
                                <option value="3GPP">3GPP Only</option>
                                <option value="ETSI">ETSI Only</option>
                            </select>
                        </div>
                        
                        <div class="filter-group">
                            <label>Specification Type</label>
                            <select id="bm25-spec-type-filter">
                                <option value="">All Types</option>
                                <option value="TS">TS (Technical Specification)</option>
                                <option value="TR">TR (Technical Report)</option>
                            </select>
                        </div>
                        
                        <div class="filter-group">
                            <label>Relevance Threshold (%)</label>
                            <input type="number" id="threshold" min="0" max="100" value="60">
                        </div>
                    </div>
                    
                    <button class="btn btn-primary" onclick="searchBM25()">Search</button>
                </div>
            </div>

            <!-- Results Container -->
            <div class="results-container" id="results-container">
                <div class="results-header">
                    <h2>Search Results</h2>
                    <div class="results-stats" id="results-stats"></div>
                </div>
                <div class="results-content" id="results-content"></div>
            </div>

            <!-- Loading Indicator -->
            <div class="loading-container" id="loading-container">
                <div class="spinner"></div>
                <p>Searching...</p>
            </div>
        </main>

        <!-- Content Detail Page -->
        <div class="content-page" id="content-page">
            <div class="content-header">
                <button class="btn btn-secondary" onclick="closeContentPage()">← Back to Results</button>
                <h2 id="content-title"></h2>
                <button class="btn btn-outline" onclick="copyAllContent()">Copy All</button>
            </div>
            <div class="content-sections" id="content-sections"></div>
        </div>
    </div>

    <script src="/static/script.js"></script>
</body>
</html>