guohanghui commited on
Commit
059f299
·
verified ·
1 Parent(s): 7c07764

Upload 257 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. Dockerfile +18 -0
  2. README.md +27 -5
  3. app.py +45 -0
  4. requirements.txt +5 -0
  5. run_docker.ps1 +35 -0
  6. run_docker.sh +82 -0
  7. whoosh/mcp_output/README_MCP.md +72 -0
  8. whoosh/mcp_output/analysis.json +3450 -0
  9. whoosh/mcp_output/diff_report.md +67 -0
  10. whoosh/mcp_output/mcp_plugin/__init__.py +0 -0
  11. whoosh/mcp_output/mcp_plugin/adapter.py +138 -0
  12. whoosh/mcp_output/mcp_plugin/main.py +13 -0
  13. whoosh/mcp_output/mcp_plugin/mcp_service.py +178 -0
  14. whoosh/mcp_output/requirements.txt +5 -0
  15. whoosh/mcp_output/start_mcp.py +30 -0
  16. whoosh/mcp_output/workflow_summary.json +194 -0
  17. whoosh/source/.hgignore +27 -0
  18. whoosh/source/.travis.yml +18 -0
  19. whoosh/source/LICENSE.txt +26 -0
  20. whoosh/source/MANIFEST.in +8 -0
  21. whoosh/source/README.md +70 -0
  22. whoosh/source/__init__.py +4 -0
  23. whoosh/source/benchmark/__init__.py +1 -0
  24. whoosh/source/benchmark/dcvgr10.txt.gz +3 -0
  25. whoosh/source/benchmark/dictionary.py +43 -0
  26. whoosh/source/benchmark/enron.py +185 -0
  27. whoosh/source/benchmark/marc21.py +297 -0
  28. whoosh/source/benchmark/reuters.py +38 -0
  29. whoosh/source/benchmark/reuters21578.txt.gz +3 -0
  30. whoosh/source/docs/Makefile +130 -0
  31. whoosh/source/docs/make.bat +170 -0
  32. whoosh/source/docs/source/analysis.rst +329 -0
  33. whoosh/source/docs/source/api/analysis.rst +62 -0
  34. whoosh/source/docs/source/api/api.rst +9 -0
  35. whoosh/source/docs/source/api/codec/base.rst +32 -0
  36. whoosh/source/docs/source/api/collectors.rst +47 -0
  37. whoosh/source/docs/source/api/columns.rst +49 -0
  38. whoosh/source/docs/source/api/fields.rst +41 -0
  39. whoosh/source/docs/source/api/filedb/filestore.rst +31 -0
  40. whoosh/source/docs/source/api/filedb/filetables.rst +22 -0
  41. whoosh/source/docs/source/api/filedb/structfile.rst +14 -0
  42. whoosh/source/docs/source/api/formats.rst +24 -0
  43. whoosh/source/docs/source/api/highlight.rst +50 -0
  44. whoosh/source/docs/source/api/idsets.rst +23 -0
  45. whoosh/source/docs/source/api/index.rst +39 -0
  46. whoosh/source/docs/source/api/lang/morph_en.rst +7 -0
  47. whoosh/source/docs/source/api/lang/porter.rst +7 -0
  48. whoosh/source/docs/source/api/lang/wordnet.rst +20 -0
  49. whoosh/source/docs/source/api/matching.rst +34 -0
  50. whoosh/source/docs/source/api/qparser.rst +97 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10
2
+
3
+ RUN useradd -m -u 1000 user && python -m pip install --upgrade pip
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
6
+
7
+ WORKDIR /app
8
+
9
+ COPY --chown=user ./requirements.txt requirements.txt
10
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
+
12
+ COPY --chown=user . /app
13
+ ENV MCP_TRANSPORT=http
14
+ ENV MCP_PORT=7860
15
+
16
+ EXPOSE 7860
17
+
18
+ CMD ["python", "whoosh/mcp_output/start_mcp.py"]
README.md CHANGED
@@ -1,10 +1,32 @@
1
  ---
2
- title: Whoosh
3
- emoji: 🏆
4
- colorFrom: yellow
5
- colorTo: pink
6
  sdk: docker
 
 
7
  pinned: false
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Whoosh MCP
3
+ emoji: 🤖
4
+ colorFrom: blue
5
+ colorTo: purple
6
  sdk: docker
7
+ sdk_version: "4.26.0"
8
+ app_file: app.py
9
  pinned: false
10
  ---
11
 
12
+ # Whoosh MCP Service
13
+
14
+ Auto-generated MCP service for whoosh.
15
+
16
+ ## Usage
17
+
18
+ ```
19
+ https://None-whoosh-mcp.hf.space/mcp
20
+ ```
21
+
22
+ ## Connect with Cursor
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "whoosh": {
28
+ "url": "https://None-whoosh-mcp.hf.space/mcp"
29
+ }
30
+ }
31
+ }
32
+ ```
app.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+ import os
3
+ import sys
4
+
5
+ mcp_plugin_path = os.path.join(os.path.dirname(__file__), "whoosh", "mcp_output", "mcp_plugin")
6
+ sys.path.insert(0, mcp_plugin_path)
7
+
8
+ app = FastAPI(
9
+ title="Whoosh MCP Service",
10
+ description="Auto-generated MCP service for whoosh",
11
+ version="1.0.0"
12
+ )
13
+
14
+ @app.get("/")
15
+ def root():
16
+ return {
17
+ "service": "Whoosh MCP Service",
18
+ "version": "1.0.0",
19
+ "status": "running",
20
+ "transport": os.environ.get("MCP_TRANSPORT", "http")
21
+ }
22
+
23
+ @app.get("/health")
24
+ def health_check():
25
+ return {"status": "healthy", "service": "whoosh MCP"}
26
+
27
+ @app.get("/tools")
28
+ def list_tools():
29
+ try:
30
+ from mcp_service import create_app
31
+ mcp_app = create_app()
32
+ tools = []
33
+ for tool_name, tool_func in mcp_app.tools.items():
34
+ tools.append({
35
+ "name": tool_name,
36
+ "description": tool_func.__doc__ or "No description available"
37
+ })
38
+ return {"tools": tools}
39
+ except Exception as e:
40
+ return {"error": f"Failed to load tools: {str(e)}"}
41
+
42
+ if __name__ == "__main__":
43
+ import uvicorn
44
+ port = int(os.environ.get("PORT", 7860))
45
+ uvicorn.run(app, host="0.0.0.0", port=port)
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ fastmcp
2
+ fastapi
3
+ uvicorn[standard]
4
+ pydantic>=2.0.0
5
+ cached-property
run_docker.ps1 ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cd $PSScriptRoot
2
+
3
+ $ErrorActionPreference = "Stop"
4
+
5
+ $entryName = if ($env:MCP_ENTRY_NAME) { $env:MCP_ENTRY_NAME } else { "whoosh" }
6
+ $entryUrl = if ($env:MCP_ENTRY_URL) { $env:MCP_ENTRY_URL } else { "http://localhost:7860/mcp" }
7
+ $imageName = if ($env:MCP_IMAGE_NAME) { $env:MCP_IMAGE_NAME } else { "whoosh-mcp" }
8
+
9
+ $mcpDir = Join-Path $env:USERPROFILE ".cursor"
10
+ $mcpPath = Join-Path $mcpDir "mcp.json"
11
+ if (!(Test-Path $mcpDir)) { New-Item -ItemType Directory -Path $mcpDir | Out-Null }
12
+
13
+ $config = @{}
14
+ if (Test-Path $mcpPath) {
15
+ try { $config = Get-Content $mcpPath -Raw | ConvertFrom-Json } catch { $config = @{} }
16
+ }
17
+
18
+ # Rebuild mcpServers as ordered and append the entry last
19
+ $serversOrdered = [ordered]@{}
20
+ if ($config -and ($config.PSObject.Properties.Name -contains "mcpServers") -and $config.mcpServers) {
21
+ $existing = $config.mcpServers
22
+ if ($existing -is [pscustomobject]) {
23
+ foreach ($p in $existing.PSObject.Properties) { if ($p.Name -ne $entryName) { $serversOrdered[$p.Name] = $p.Value } }
24
+ } elseif ($existing -is [System.Collections.IDictionary]) {
25
+ foreach ($k in $existing.Keys) { if ($k -ne $entryName) { $serversOrdered[$k] = $existing[$k] } }
26
+ }
27
+ }
28
+ $serversOrdered[$entryName] = @{ url = $entryUrl }
29
+ $config = @{ mcpServers = $serversOrdered }
30
+
31
+ $config | ConvertTo-Json -Depth 10 | Set-Content -Path $mcpPath -Encoding UTF8
32
+ Write-Host ("Updated $entryName in " + $mcpPath + " -> " + $entryUrl)
33
+
34
+ docker build -t $imageName .
35
+ docker run --rm -p 7860:7860 $imageName
run_docker.sh ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # Switch to the directory where this script is located
5
+ cd "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
6
+
7
+ mcp_entry_name="${MCP_ENTRY_NAME:-whoosh}"
8
+ mcp_entry_url="${MCP_ENTRY_URL:-http://localhost:7860/mcp}"
9
+ mcp_dir="${HOME}/.cursor"
10
+ mcp_path="${mcp_dir}/mcp.json"
11
+ mkdir -p "${mcp_dir}"
12
+
13
+ if command -v python3 >/dev/null 2>&1; then
14
+ python3 - "${mcp_path}" "${mcp_entry_name}" "${mcp_entry_url}" <<'PY'
15
+ import json, os, sys
16
+ path, name, url = sys.argv[1:4]
17
+ cfg = {"mcpServers": {}}
18
+ if os.path.exists(path):
19
+ try:
20
+ with open(path, "r", encoding="utf-8") as f:
21
+ cfg = json.load(f)
22
+ except Exception:
23
+ cfg = {"mcpServers": {}}
24
+ if not isinstance(cfg, dict):
25
+ cfg = {"mcpServers": {}}
26
+ servers = cfg.get("mcpServers")
27
+ if not isinstance(servers, dict):
28
+ servers = {}
29
+ ordered = {}
30
+ for k, v in servers.items():
31
+ if k != name:
32
+ ordered[k] = v
33
+ ordered[name] = {"url": url}
34
+ cfg = {"mcpServers": ordered}
35
+ with open(path, "w", encoding="utf-8") as f:
36
+ json.dump(cfg, f, indent=2, ensure_ascii=False)
37
+ PY
38
+ elif command -v python >/dev/null 2>&1; then
39
+ python - "${mcp_path}" "${mcp_entry_name}" "${mcp_entry_url}" <<'PY'
40
+ import json, os, sys
41
+ path, name, url = sys.argv[1:4]
42
+ cfg = {"mcpServers": {}}
43
+ if os.path.exists(path):
44
+ try:
45
+ with open(path, "r", encoding="utf-8") as f:
46
+ cfg = json.load(f)
47
+ except Exception:
48
+ cfg = {"mcpServers": {}}
49
+ if not isinstance(cfg, dict):
50
+ cfg = {"mcpServers": {}}
51
+ servers = cfg.get("mcpServers")
52
+ if not isinstance(servers, dict):
53
+ servers = {}
54
+ ordered = {}
55
+ for k, v in servers.items():
56
+ if k != name:
57
+ ordered[k] = v
58
+ ordered[name] = {"url": url}
59
+ cfg = {"mcpServers": ordered}
60
+ with open(path, "w", encoding="utf-8") as f:
61
+ json.dump(cfg, f, indent=2, ensure_ascii=False)
62
+ PY
63
+ elif command -v jq >/dev/null 2>&1; then
64
+ name="${mcp_entry_name}"; url="${mcp_entry_url}"
65
+ if [ -f "${mcp_path}" ]; then
66
+ tmp="$(mktemp)"
67
+ jq --arg name "$name" --arg url "$url" '
68
+ .mcpServers = (.mcpServers // {})
69
+ | .mcpServers as $s
70
+ | ($s | with_entries(select(.key != $name))) as $base
71
+ | .mcpServers = ($base + {($name): {"url": $url}})
72
+ ' "${mcp_path}" > "${tmp}" && mv "${tmp}" "${mcp_path}"
73
+ else
74
+ printf '{ "mcpServers": { "%s": { "url": "%s" } } }
75
+ ' "$name" "$url" > "${mcp_path}"
76
+ fi
77
+ else
78
+ echo "Warning: neither python nor jq found; skipped updating ~/.cursor/mcp.json" >&2
79
+ fi
80
+
81
+ docker build -t whoosh-mcp .
82
+ docker run --rm -p 7860:7860 whoosh-mcp
whoosh/mcp_output/README_MCP.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Whoosh: Full-Text Search Engine Library
2
+
3
+ ## Project Introduction
4
+
5
+ Whoosh is a fast, pure-Python full-text indexing, search, and spell-checking library developed by Matt Chaput. It provides a complete search engine solution that can index documents, parse complex queries, and return ranked search results. Key features include:
6
+
7
+ - **Pure Python**: No external dependencies except for optional cached-property.
8
+ - **Full-featured**: Includes indexing, searching, query parsing, highlighting, and spell checking.
9
+ - **Flexible**: Supports multiple field types, custom analyzers, and pluggable components.
10
+ - **Production-ready**: Used in real applications with support for concurrent access.
11
+
12
+ ## Installation Method
13
+
14
+ To install Whoosh, ensure you have Python 3.6 or higher. You can install it using pip:
15
+
16
+ ```
17
+ pip install Whoosh
18
+ ```
19
+
20
+ ## Quick Start
21
+
22
+ Here's a quick guide to get you started with Whoosh:
23
+
24
+ 1. **Define a Schema**: Specify what fields your documents will have.
25
+ 2. **Create an Index**: Set up storage for your searchable data.
26
+ 3. **Add Documents**: Populate the index with your content.
27
+ 4. **Search**: Query the index and retrieve results.
28
+
29
+ Example:
30
+
31
+ ```
32
+ from whoosh.index import create_in
33
+ from whoosh.fields import Schema, TEXT, ID
34
+
35
+ schema = Schema(title=TEXT(stored=True), content=TEXT)
36
+ index = create_in("indexdir", schema)
37
+
38
+ # Add documents
39
+ writer = index.writer()
40
+ writer.add_document(title="First document", content="This is the first document we've added!")
41
+ writer.commit()
42
+
43
+ # Search
44
+ from whoosh.qparser import QueryParser
45
+ with index.searcher() as searcher:
46
+ query = QueryParser("content", index.schema).parse("first")
47
+ results = searcher.search(query)
48
+ for result in results:
49
+ print(result['title'])
50
+ ```
51
+
52
+ ## Available Tools and Endpoints List
53
+
54
+ Whoosh provides several tools and services to enhance your search capabilities:
55
+
56
+ - **IndexWriter**: For adding and updating documents in the index.
57
+ - **IndexReader**: For reading and searching the index.
58
+ - **QueryParser**: For parsing user queries into search objects.
59
+ - **FileStorage**: For managing the storage of index files.
60
+ - **Highlighting**: For generating highlighted snippets of search results.
61
+
62
+ ## Common Issues and Notes
63
+
64
+ - **Dependencies**: Ensure Python 3.6 or higher is installed.
65
+ - **Environment**: Whoosh is a pure-Python library and does not require additional dependencies, making it easy to integrate into various environments.
66
+ - **Performance**: For large datasets, consider using multiprocessing to speed up indexing.
67
+
68
+ ## Reference Links or Documentation
69
+
70
+ For more detailed information, visit the [Whoosh GitHub Repository](https://github.com/mchaput/whoosh) or refer to the [official documentation](https://whoosh.readthedocs.io/en/latest/).
71
+
72
+ By following this guide, you should be able to set up and start using Whoosh for your full-text search needs efficiently.
whoosh/mcp_output/analysis.json ADDED
@@ -0,0 +1,3450 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "summary": {
3
+ "repository_url": "https://github.com/mchaput/whoosh",
4
+ "summary": "Imported via zip fallback, file count: 167",
5
+ "file_tree": {
6
+ ".travis.yml": {
7
+ "size": 227
8
+ },
9
+ "LICENSE.txt": {
10
+ "size": 1482
11
+ },
12
+ "README.md": {
13
+ "size": 2422
14
+ },
15
+ "benchmark/dictionary.py": {
16
+ "size": 1258
17
+ },
18
+ "benchmark/enron.py": {
19
+ "size": 6452
20
+ },
21
+ "benchmark/marc21.py": {
22
+ "size": 9190
23
+ },
24
+ "benchmark/reuters.py": {
25
+ "size": 1211
26
+ },
27
+ "docs/source/conf.py": {
28
+ "size": 6396
29
+ },
30
+ "scripts/make_checkpoint.py": {
31
+ "size": 1832
32
+ },
33
+ "scripts/pylint.ini": {
34
+ "size": 8776
35
+ },
36
+ "scripts/read_checkpoint.py": {
37
+ "size": 1287
38
+ },
39
+ "setup.cfg": {
40
+ "size": 1123
41
+ },
42
+ "setup.py": {
43
+ "size": 1728
44
+ },
45
+ "src/whoosh/__init__.py": {
46
+ "size": 2059
47
+ },
48
+ "src/whoosh/analysis/__init__.py": {
49
+ "size": 3288
50
+ },
51
+ "src/whoosh/analysis/acore.py": {
52
+ "size": 5525
53
+ },
54
+ "src/whoosh/analysis/analyzers.py": {
55
+ "size": 11277
56
+ },
57
+ "src/whoosh/analysis/filters.py": {
58
+ "size": 16428
59
+ },
60
+ "src/whoosh/analysis/intraword.py": {
61
+ "size": 18991
62
+ },
63
+ "src/whoosh/analysis/morph.py": {
64
+ "size": 10125
65
+ },
66
+ "src/whoosh/analysis/ngrams.py": {
67
+ "size": 8788
68
+ },
69
+ "src/whoosh/analysis/tokenizers.py": {
70
+ "size": 12678
71
+ },
72
+ "src/whoosh/automata/__init__.py": {
73
+ "size": 0
74
+ },
75
+ "src/whoosh/automata/fsa.py": {
76
+ "size": 20430
77
+ },
78
+ "src/whoosh/automata/glob.py": {
79
+ "size": 3333
80
+ },
81
+ "src/whoosh/automata/lev.py": {
82
+ "size": 974
83
+ },
84
+ "src/whoosh/automata/nfa.py": {
85
+ "size": 10498
86
+ },
87
+ "src/whoosh/automata/reg.py": {
88
+ "size": 3974
89
+ },
90
+ "src/whoosh/classify.py": {
91
+ "size": 11916
92
+ },
93
+ "src/whoosh/codec/__init__.py": {
94
+ "size": 1649
95
+ },
96
+ "src/whoosh/codec/base.py": {
97
+ "size": 24192
98
+ },
99
+ "src/whoosh/codec/memory.py": {
100
+ "size": 11000
101
+ },
102
+ "src/whoosh/codec/plaintext.py": {
103
+ "size": 14256
104
+ },
105
+ "src/whoosh/codec/whoosh3.py": {
106
+ "size": 42743
107
+ },
108
+ "src/whoosh/collectors.py": {
109
+ "size": 42330
110
+ },
111
+ "src/whoosh/columns.py": {
112
+ "size": 47383
113
+ },
114
+ "src/whoosh/compat.py": {
115
+ "size": 5357
116
+ },
117
+ "src/whoosh/externalsort.py": {
118
+ "size": 7984
119
+ },
120
+ "src/whoosh/fields.py": {
121
+ "size": 56496
122
+ },
123
+ "src/whoosh/filedb/__init__.py": {
124
+ "size": 0
125
+ },
126
+ "src/whoosh/filedb/compound.py": {
127
+ "size": 11090
128
+ },
129
+ "src/whoosh/filedb/filestore.py": {
130
+ "size": 21584
131
+ },
132
+ "src/whoosh/filedb/filetables.py": {
133
+ "size": 25225
134
+ },
135
+ "src/whoosh/filedb/gae.py": {
136
+ "size": 4872
137
+ },
138
+ "src/whoosh/filedb/structfile.py": {
139
+ "size": 12453
140
+ },
141
+ "src/whoosh/formats.py": {
142
+ "size": 16706
143
+ },
144
+ "src/whoosh/highlight.py": {
145
+ "size": 38681
146
+ },
147
+ "src/whoosh/idsets.py": {
148
+ "size": 19109
149
+ },
150
+ "src/whoosh/index.py": {
151
+ "size": 24282
152
+ },
153
+ "src/whoosh/lang/__init__.py": {
154
+ "size": 4285
155
+ },
156
+ "src/whoosh/lang/dmetaphone.py": {
157
+ "size": 17520
158
+ },
159
+ "src/whoosh/lang/isri.py": {
160
+ "size": 16786
161
+ },
162
+ "src/whoosh/lang/lovins.py": {
163
+ "size": 12645
164
+ },
165
+ "src/whoosh/lang/morph_en.py": {
166
+ "size": 48468
167
+ },
168
+ "src/whoosh/lang/paicehusk.py": {
169
+ "size": 6788
170
+ },
171
+ "src/whoosh/lang/phonetic.py": {
172
+ "size": 3350
173
+ },
174
+ "src/whoosh/lang/porter.py": {
175
+ "size": 4231
176
+ },
177
+ "src/whoosh/lang/porter2.py": {
178
+ "size": 8314
179
+ },
180
+ "src/whoosh/lang/snowball/LICENSE.txt": {
181
+ "size": 574
182
+ },
183
+ "src/whoosh/lang/snowball/__init__.py": {
184
+ "size": 2622
185
+ },
186
+ "src/whoosh/lang/snowball/bases.py": {
187
+ "size": 4874
188
+ },
189
+ "src/whoosh/lang/snowball/danish.py": {
190
+ "size": 4112
191
+ },
192
+ "src/whoosh/lang/snowball/dutch.py": {
193
+ "size": 6194
194
+ },
195
+ "src/whoosh/lang/snowball/english.py": {
196
+ "size": 17347
197
+ },
198
+ "src/whoosh/lang/snowball/finnish.py": {
199
+ "size": 10074
200
+ },
201
+ "src/whoosh/lang/snowball/french.py": {
202
+ "size": 14461
203
+ },
204
+ "src/whoosh/lang/snowball/german.py": {
205
+ "size": 5347
206
+ },
207
+ "src/whoosh/lang/snowball/hungarian.py": {
208
+ "size": 11694
209
+ },
210
+ "src/whoosh/lang/snowball/italian.py": {
211
+ "size": 9125
212
+ },
213
+ "src/whoosh/lang/snowball/norwegian.py": {
214
+ "size": 2803
215
+ },
216
+ "src/whoosh/lang/snowball/portugese.py": {
217
+ "size": 8221
218
+ },
219
+ "src/whoosh/lang/snowball/romanian.py": {
220
+ "size": 11966
221
+ },
222
+ "src/whoosh/lang/snowball/russian.py": {
223
+ "size": 20904
224
+ },
225
+ "src/whoosh/lang/snowball/spanish.py": {
226
+ "size": 11013
227
+ },
228
+ "src/whoosh/lang/snowball/swedish.py": {
229
+ "size": 2760
230
+ },
231
+ "src/whoosh/lang/stopwords.py": {
232
+ "size": 15721
233
+ },
234
+ "src/whoosh/lang/wordnet.py": {
235
+ "size": 8672
236
+ },
237
+ "src/whoosh/legacy.py": {
238
+ "size": 3459
239
+ },
240
+ "src/whoosh/matching/__init__.py": {
241
+ "size": 1678
242
+ },
243
+ "src/whoosh/matching/binary.py": {
244
+ "size": 24449
245
+ },
246
+ "src/whoosh/matching/combo.py": {
247
+ "size": 9926
248
+ },
249
+ "src/whoosh/matching/mcore.py": {
250
+ "size": 18822
251
+ },
252
+ "src/whoosh/matching/wrappers.py": {
253
+ "size": 17477
254
+ },
255
+ "src/whoosh/multiproc.py": {
256
+ "size": 15128
257
+ },
258
+ "src/whoosh/qparser/__init__.py": {
259
+ "size": 1640
260
+ },
261
+ "src/whoosh/qparser/common.py": {
262
+ "size": 2408
263
+ },
264
+ "src/whoosh/qparser/dateparse.py": {
265
+ "size": 32771
266
+ },
267
+ "src/whoosh/qparser/default.py": {
268
+ "size": 17071
269
+ },
270
+ "src/whoosh/qparser/plugins.py": {
271
+ "size": 50402
272
+ },
273
+ "src/whoosh/qparser/syntax.py": {
274
+ "size": 18620
275
+ },
276
+ "src/whoosh/qparser/taggers.py": {
277
+ "size": 3624
278
+ },
279
+ "src/whoosh/query/__init__.py": {
280
+ "size": 1843
281
+ },
282
+ "src/whoosh/query/compound.py": {
283
+ "size": 22123
284
+ },
285
+ "src/whoosh/query/nested.py": {
286
+ "size": 15598
287
+ },
288
+ "src/whoosh/query/positional.py": {
289
+ "size": 9427
290
+ },
291
+ "src/whoosh/query/qcolumns.py": {
292
+ "size": 4197
293
+ },
294
+ "src/whoosh/query/qcore.py": {
295
+ "size": 23439
296
+ },
297
+ "src/whoosh/query/ranges.py": {
298
+ "size": 13420
299
+ },
300
+ "src/whoosh/query/spans.py": {
301
+ "size": 29069
302
+ },
303
+ "src/whoosh/query/terms.py": {
304
+ "size": 17880
305
+ },
306
+ "src/whoosh/query/wrappers.py": {
307
+ "size": 6740
308
+ },
309
+ "src/whoosh/reading.py": {
310
+ "size": 42427
311
+ },
312
+ "src/whoosh/scoring.py": {
313
+ "size": 20940
314
+ },
315
+ "src/whoosh/searching.py": {
316
+ "size": 64528
317
+ },
318
+ "src/whoosh/sorting.py": {
319
+ "size": 41941
320
+ },
321
+ "src/whoosh/spelling.py": {
322
+ "size": 12550
323
+ },
324
+ "src/whoosh/support/__init__.py": {
325
+ "size": 0
326
+ },
327
+ "src/whoosh/support/base85.py": {
328
+ "size": 2473
329
+ },
330
+ "src/whoosh/support/bench.py": {
331
+ "size": 21018
332
+ },
333
+ "src/whoosh/support/charset.py": {
334
+ "size": 79555
335
+ },
336
+ "src/whoosh/support/levenshtein.py": {
337
+ "size": 2385
338
+ },
339
+ "src/whoosh/support/relativedelta.py": {
340
+ "size": 17347
341
+ },
342
+ "src/whoosh/support/unicode.py": {
343
+ "size": 26604
344
+ },
345
+ "src/whoosh/system.py": {
346
+ "size": 2964
347
+ },
348
+ "src/whoosh/util/__init__.py": {
349
+ "size": 4411
350
+ },
351
+ "src/whoosh/util/cache.py": {
352
+ "size": 3874
353
+ },
354
+ "src/whoosh/util/filelock.py": {
355
+ "size": 5291
356
+ },
357
+ "src/whoosh/util/loading.py": {
358
+ "size": 3221
359
+ },
360
+ "src/whoosh/util/numeric.py": {
361
+ "size": 11285
362
+ },
363
+ "src/whoosh/util/numlists.py": {
364
+ "size": 10425
365
+ },
366
+ "src/whoosh/util/testing.py": {
367
+ "size": 4503
368
+ },
369
+ "src/whoosh/util/text.py": {
370
+ "size": 4372
371
+ },
372
+ "src/whoosh/util/times.py": {
373
+ "size": 16936
374
+ },
375
+ "src/whoosh/util/varints.py": {
376
+ "size": 3198
377
+ },
378
+ "src/whoosh/util/versions.py": {
379
+ "size": 5275
380
+ },
381
+ "src/whoosh/writing.py": {
382
+ "size": 46584
383
+ },
384
+ "stress/test_bigfacet.py": {
385
+ "size": 1306
386
+ },
387
+ "stress/test_bigindex.py": {
388
+ "size": 2236
389
+ },
390
+ "stress/test_bigsort.py": {
391
+ "size": 1556
392
+ },
393
+ "stress/test_bigtable.py": {
394
+ "size": 1024
395
+ },
396
+ "stress/test_hugeindex.py": {
397
+ "size": 1172
398
+ },
399
+ "stress/test_threading.py": {
400
+ "size": 1919
401
+ },
402
+ "stress/test_update.py": {
403
+ "size": 703
404
+ },
405
+ "tests/test_analysis.py": {
406
+ "size": 19093
407
+ },
408
+ "tests/test_automata.py": {
409
+ "size": 9660
410
+ },
411
+ "tests/test_bits.py": {
412
+ "size": 4379
413
+ },
414
+ "tests/test_classify.py": {
415
+ "size": 6928
416
+ },
417
+ "tests/test_codecs.py": {
418
+ "size": 19453
419
+ },
420
+ "tests/test_collector.py": {
421
+ "size": 8980
422
+ },
423
+ "tests/test_columns.py": {
424
+ "size": 10928
425
+ },
426
+ "tests/test_compound.py": {
427
+ "size": 1741
428
+ },
429
+ "tests/test_dateparse.py": {
430
+ "size": 16282
431
+ },
432
+ "tests/test_fields.py": {
433
+ "size": 20876
434
+ },
435
+ "tests/test_flexible.py": {
436
+ "size": 3671
437
+ },
438
+ "tests/test_highlighting.py": {
439
+ "size": 12647
440
+ },
441
+ "tests/test_indexing.py": {
442
+ "size": 26688
443
+ },
444
+ "tests/test_matching.py": {
445
+ "size": 17081
446
+ },
447
+ "tests/test_misc.py": {
448
+ "size": 4026
449
+ },
450
+ "tests/test_mpwriter.py": {
451
+ "size": 8467
452
+ },
453
+ "tests/test_nested.py": {
454
+ "size": 17227
455
+ },
456
+ "tests/test_parse_plugins.py": {
457
+ "size": 23464
458
+ },
459
+ "tests/test_parsing.py": {
460
+ "size": 34249
461
+ },
462
+ "tests/test_postings.py": {
463
+ "size": 4519
464
+ },
465
+ "tests/test_quality.py": {
466
+ "size": 5524
467
+ },
468
+ "tests/test_queries.py": {
469
+ "size": 21578
470
+ },
471
+ "tests/test_reading.py": {
472
+ "size": 16206
473
+ },
474
+ "tests/test_results.py": {
475
+ "size": 24078
476
+ },
477
+ "tests/test_searching.py": {
478
+ "size": 64863
479
+ },
480
+ "tests/test_sorting.py": {
481
+ "size": 38970
482
+ },
483
+ "tests/test_spans.py": {
484
+ "size": 12049
485
+ },
486
+ "tests/test_spelling.py": {
487
+ "size": 13120
488
+ },
489
+ "tests/test_stem.py": {
490
+ "size": 805
491
+ },
492
+ "tests/test_tables.py": {
493
+ "size": 6110
494
+ },
495
+ "tests/test_vectors.py": {
496
+ "size": 5051
497
+ },
498
+ "tests/test_weightings.py": {
499
+ "size": 2736
500
+ },
501
+ "tests/test_writing.py": {
502
+ "size": 17038
503
+ },
504
+ "tox.ini": {
505
+ "size": 128
506
+ }
507
+ },
508
+ "processed_by": "zip_fallback",
509
+ "success": true
510
+ },
511
+ "structure": {
512
+ "packages": [
513
+ "source.src.whoosh"
514
+ ]
515
+ },
516
+ "dependencies": {
517
+ "has_environment_yml": false,
518
+ "has_requirements_txt": false,
519
+ "pyproject": false,
520
+ "setup_cfg": true,
521
+ "setup_py": true
522
+ },
523
+ "entry_points": {
524
+ "imports": [],
525
+ "cli": [],
526
+ "modules": []
527
+ },
528
+ "llm_analysis": {
529
+ "core_modules": [
530
+ {
531
+ "package": "setup",
532
+ "module": "setup",
533
+ "functions": [],
534
+ "classes": [
535
+ "PyTest"
536
+ ],
537
+ "function_signatures": {},
538
+ "description": "Discovered via AST scan"
539
+ },
540
+ {
541
+ "package": "benchmark",
542
+ "module": "dictionary",
543
+ "functions": [],
544
+ "classes": [
545
+ "VulgarTongue"
546
+ ],
547
+ "function_signatures": {},
548
+ "description": "Discovered via AST scan"
549
+ },
550
+ {
551
+ "package": "benchmark",
552
+ "module": "enron",
553
+ "functions": [],
554
+ "classes": [
555
+ "Enron"
556
+ ],
557
+ "function_signatures": {},
558
+ "description": "Discovered via AST scan"
559
+ },
560
+ {
561
+ "package": "benchmark",
562
+ "module": "marc21",
563
+ "functions": [
564
+ "author",
565
+ "getfields",
566
+ "isbn",
567
+ "joinsubfields",
568
+ "location",
569
+ "make_index",
570
+ "parse_record",
571
+ "physical",
572
+ "print_record",
573
+ "publisher",
574
+ "pubyear",
575
+ "read_file",
576
+ "read_record",
577
+ "search",
578
+ "subfield",
579
+ "subjects",
580
+ "title",
581
+ "uni",
582
+ "uniform_title"
583
+ ],
584
+ "classes": [],
585
+ "function_signatures": {
586
+ "read_file": [
587
+ "dbfile",
588
+ "tags"
589
+ ],
590
+ "read_record": [
591
+ "filename",
592
+ "pos",
593
+ "tags"
594
+ ],
595
+ "parse_record": [
596
+ "data",
597
+ "tags"
598
+ ],
599
+ "subfield": [
600
+ "vs",
601
+ "code"
602
+ ],
603
+ "joinsubfields": [
604
+ "vs"
605
+ ],
606
+ "getfields": [
607
+ "d"
608
+ ],
609
+ "title": [
610
+ "d"
611
+ ],
612
+ "isbn": [
613
+ "d"
614
+ ],
615
+ "author": [
616
+ "d"
617
+ ],
618
+ "uniform_title": [
619
+ "d"
620
+ ],
621
+ "subjects": [
622
+ "d"
623
+ ],
624
+ "physical": [
625
+ "d"
626
+ ],
627
+ "location": [
628
+ "d"
629
+ ],
630
+ "publisher": [
631
+ "d"
632
+ ],
633
+ "pubyear": [
634
+ "d"
635
+ ],
636
+ "uni": [
637
+ "v"
638
+ ],
639
+ "make_index": [
640
+ "basedir",
641
+ "ixdir",
642
+ "procs",
643
+ "limitmb",
644
+ "multisegment",
645
+ "glob"
646
+ ],
647
+ "print_record": [
648
+ "no",
649
+ "basedir",
650
+ "filename",
651
+ "pos"
652
+ ],
653
+ "search": [
654
+ "qstring",
655
+ "ixdir",
656
+ "basedir",
657
+ "limit",
658
+ "optimize",
659
+ "scores"
660
+ ]
661
+ },
662
+ "description": "Discovered via AST scan"
663
+ },
664
+ {
665
+ "package": "benchmark",
666
+ "module": "reuters",
667
+ "functions": [],
668
+ "classes": [
669
+ "Reuters"
670
+ ],
671
+ "function_signatures": {},
672
+ "description": "Discovered via AST scan"
673
+ },
674
+ {
675
+ "package": "src",
676
+ "module": "whoosh",
677
+ "functions": [
678
+ "versionstring"
679
+ ],
680
+ "classes": [],
681
+ "function_signatures": {
682
+ "versionstring": [
683
+ "build",
684
+ "extra"
685
+ ]
686
+ },
687
+ "description": "Discovered via AST scan"
688
+ },
689
+ {
690
+ "package": "src.whoosh",
691
+ "module": "classify",
692
+ "functions": [
693
+ "hamming_distance",
694
+ "kmeans",
695
+ "shingles",
696
+ "simhash",
697
+ "swin",
698
+ "two_pass_variance",
699
+ "weighted_incremental_variance"
700
+ ],
701
+ "classes": [
702
+ "Bo1Model",
703
+ "Bo2Model",
704
+ "Expander",
705
+ "ExpansionModel",
706
+ "KLModel"
707
+ ],
708
+ "function_signatures": {
709
+ "shingles": [
710
+ "input",
711
+ "size"
712
+ ],
713
+ "simhash": [
714
+ "features",
715
+ "hashbits"
716
+ ],
717
+ "hamming_distance": [
718
+ "first_hash",
719
+ "other_hash",
720
+ "hashbits"
721
+ ],
722
+ "kmeans": [
723
+ "data",
724
+ "k",
725
+ "t",
726
+ "distfun",
727
+ "maxiter",
728
+ "centers"
729
+ ],
730
+ "two_pass_variance": [
731
+ "data"
732
+ ],
733
+ "weighted_incremental_variance": [
734
+ "data_weight_pairs"
735
+ ],
736
+ "swin": [
737
+ "data",
738
+ "size"
739
+ ]
740
+ },
741
+ "description": "Discovered via AST scan"
742
+ },
743
+ {
744
+ "package": "src.whoosh",
745
+ "module": "collectors",
746
+ "functions": [
747
+ "ilen"
748
+ ],
749
+ "classes": [
750
+ "CollapseCollector",
751
+ "Collector",
752
+ "FacetCollector",
753
+ "FilterCollector",
754
+ "ScoredCollector",
755
+ "SortingCollector",
756
+ "TermsCollector",
757
+ "TimeLimitCollector",
758
+ "TopCollector",
759
+ "UnlimitedCollector",
760
+ "UnsortedCollector",
761
+ "WrappingCollector"
762
+ ],
763
+ "function_signatures": {
764
+ "ilen": [
765
+ "iterator"
766
+ ]
767
+ },
768
+ "description": "Discovered via AST scan"
769
+ },
770
+ {
771
+ "package": "src.whoosh",
772
+ "module": "columns",
773
+ "functions": [],
774
+ "classes": [
775
+ "BitColumn",
776
+ "ClampedNumericColumn",
777
+ "Column",
778
+ "ColumnReader",
779
+ "ColumnWriter",
780
+ "CompressedBlockColumn",
781
+ "CompressedBytesColumn",
782
+ "EmptyColumnReader",
783
+ "FixedBytesColumn",
784
+ "FixedBytesListColumn",
785
+ "ListColumn",
786
+ "ListColumnReader",
787
+ "MultiColumnReader",
788
+ "NumericColumn",
789
+ "PickleColumn",
790
+ "RefBytesColumn",
791
+ "StructColumn",
792
+ "TranslatingColumnReader",
793
+ "VarBytesColumn",
794
+ "VarBytesListColumn",
795
+ "WrappedColumn",
796
+ "WrappedColumnReader",
797
+ "WrappedColumnWriter"
798
+ ],
799
+ "function_signatures": {},
800
+ "description": "Discovered via AST scan"
801
+ },
802
+ {
803
+ "package": "src.whoosh",
804
+ "module": "compat",
805
+ "functions": [
806
+ "htmlescape"
807
+ ],
808
+ "classes": [],
809
+ "function_signatures": {
810
+ "htmlescape": [
811
+ "s",
812
+ "quote"
813
+ ]
814
+ },
815
+ "description": "Discovered via AST scan"
816
+ },
817
+ {
818
+ "package": "src.whoosh",
819
+ "module": "externalsort",
820
+ "functions": [
821
+ "sort"
822
+ ],
823
+ "classes": [
824
+ "SortingPool"
825
+ ],
826
+ "function_signatures": {
827
+ "sort": [
828
+ "items",
829
+ "maxsize",
830
+ "tempdir",
831
+ "maxfiles"
832
+ ]
833
+ },
834
+ "description": "Discovered via AST scan"
835
+ },
836
+ {
837
+ "package": "src.whoosh",
838
+ "module": "fields",
839
+ "functions": [
840
+ "ensure_schema",
841
+ "merge_fielddict",
842
+ "merge_schema",
843
+ "merge_schemas"
844
+ ],
845
+ "classes": [
846
+ "BOOLEAN",
847
+ "COLUMN",
848
+ "DATETIME",
849
+ "FieldConfigurationError",
850
+ "FieldType",
851
+ "FieldWrapper",
852
+ "ID",
853
+ "IDLIST",
854
+ "KEYWORD",
855
+ "MetaSchema",
856
+ "NGRAM",
857
+ "NGRAMWORDS",
858
+ "NUMERIC",
859
+ "ReverseField",
860
+ "STORED",
861
+ "Schema",
862
+ "SchemaClass",
863
+ "SpellField",
864
+ "TEXT",
865
+ "UnknownFieldError"
866
+ ],
867
+ "function_signatures": {
868
+ "ensure_schema": [
869
+ "schema"
870
+ ],
871
+ "merge_fielddict": [
872
+ "d1",
873
+ "d2"
874
+ ],
875
+ "merge_schema": [
876
+ "s1",
877
+ "s2"
878
+ ],
879
+ "merge_schemas": [
880
+ "schemas"
881
+ ]
882
+ },
883
+ "description": "Discovered via AST scan"
884
+ },
885
+ {
886
+ "package": "src.whoosh",
887
+ "module": "formats",
888
+ "functions": [
889
+ "tokens"
890
+ ],
891
+ "classes": [
892
+ "CharacterBoosts",
893
+ "Characters",
894
+ "Existence",
895
+ "Format",
896
+ "Frequency",
897
+ "PositionBoosts",
898
+ "Positions"
899
+ ],
900
+ "function_signatures": {
901
+ "tokens": [
902
+ "value",
903
+ "analyzer",
904
+ "kwargs"
905
+ ]
906
+ },
907
+ "description": "Discovered via AST scan"
908
+ },
909
+ {
910
+ "package": "src.whoosh",
911
+ "module": "highlight",
912
+ "functions": [
913
+ "FIRST",
914
+ "LONGER",
915
+ "SCORE",
916
+ "SHORTER",
917
+ "get_text",
918
+ "highlight",
919
+ "mkfrag",
920
+ "set_matched_filter",
921
+ "set_matched_filter_phrases",
922
+ "top_fragments"
923
+ ],
924
+ "classes": [
925
+ "BasicFragmentScorer",
926
+ "ContextFragmenter",
927
+ "Formatter",
928
+ "Fragment",
929
+ "FragmentScorer",
930
+ "Fragmenter",
931
+ "GenshiFormatter",
932
+ "Highlighter",
933
+ "HtmlFormatter",
934
+ "NullFormatter",
935
+ "PinpointFragmenter",
936
+ "SentenceFragmenter",
937
+ "UppercaseFormatter",
938
+ "WholeFragmenter"
939
+ ],
940
+ "function_signatures": {
941
+ "mkfrag": [
942
+ "text",
943
+ "tokens",
944
+ "startchar",
945
+ "endchar",
946
+ "charsbefore",
947
+ "charsafter"
948
+ ],
949
+ "set_matched_filter": [
950
+ "tokens",
951
+ "termset"
952
+ ],
953
+ "set_matched_filter_phrases": [
954
+ "tokens",
955
+ "text",
956
+ "terms",
957
+ "phrases"
958
+ ],
959
+ "SCORE": [
960
+ "fragment"
961
+ ],
962
+ "FIRST": [
963
+ "fragment"
964
+ ],
965
+ "LONGER": [
966
+ "fragment"
967
+ ],
968
+ "SHORTER": [
969
+ "fragment"
970
+ ],
971
+ "get_text": [
972
+ "original",
973
+ "token",
974
+ "replace"
975
+ ],
976
+ "top_fragments": [
977
+ "fragments",
978
+ "count",
979
+ "scorer",
980
+ "order",
981
+ "minscore"
982
+ ],
983
+ "highlight": [
984
+ "text",
985
+ "terms",
986
+ "analyzer",
987
+ "fragmenter",
988
+ "formatter",
989
+ "top",
990
+ "scorer",
991
+ "minscore",
992
+ "order",
993
+ "mode"
994
+ ]
995
+ },
996
+ "description": "Discovered via AST scan"
997
+ },
998
+ {
999
+ "package": "src.whoosh",
1000
+ "module": "idsets",
1001
+ "functions": [],
1002
+ "classes": [
1003
+ "BaseBitSet",
1004
+ "BitSet",
1005
+ "DocIdSet",
1006
+ "MultiIdSet",
1007
+ "OnDiskBitSet",
1008
+ "ReverseIdSet",
1009
+ "RoaringIdSet",
1010
+ "SortedIntSet"
1011
+ ],
1012
+ "function_signatures": {},
1013
+ "description": "Discovered via AST scan"
1014
+ },
1015
+ {
1016
+ "package": "src.whoosh",
1017
+ "module": "index",
1018
+ "functions": [
1019
+ "clean_files",
1020
+ "create_in",
1021
+ "exists",
1022
+ "exists_in",
1023
+ "open_dir",
1024
+ "version",
1025
+ "version_in"
1026
+ ],
1027
+ "classes": [
1028
+ "EmptyIndexError",
1029
+ "FileIndex",
1030
+ "Index",
1031
+ "IndexError",
1032
+ "IndexVersionError",
1033
+ "LockError",
1034
+ "OutOfDateError",
1035
+ "TOC"
1036
+ ],
1037
+ "function_signatures": {
1038
+ "create_in": [
1039
+ "dirname",
1040
+ "schema",
1041
+ "indexname"
1042
+ ],
1043
+ "open_dir": [
1044
+ "dirname",
1045
+ "indexname",
1046
+ "readonly",
1047
+ "schema"
1048
+ ],
1049
+ "exists_in": [
1050
+ "dirname",
1051
+ "indexname"
1052
+ ],
1053
+ "exists": [
1054
+ "storage",
1055
+ "indexname"
1056
+ ],
1057
+ "version_in": [
1058
+ "dirname",
1059
+ "indexname"
1060
+ ],
1061
+ "version": [
1062
+ "storage",
1063
+ "indexname"
1064
+ ],
1065
+ "clean_files": [
1066
+ "storage",
1067
+ "indexname",
1068
+ "gen",
1069
+ "segments"
1070
+ ]
1071
+ },
1072
+ "description": "Discovered via AST scan"
1073
+ },
1074
+ {
1075
+ "package": "src.whoosh",
1076
+ "module": "legacy",
1077
+ "functions": [
1078
+ "load_110_toc"
1079
+ ],
1080
+ "classes": [],
1081
+ "function_signatures": {
1082
+ "load_110_toc": [
1083
+ "stream",
1084
+ "gen",
1085
+ "schema",
1086
+ "version"
1087
+ ]
1088
+ },
1089
+ "description": "Discovered via AST scan"
1090
+ },
1091
+ {
1092
+ "package": "src.whoosh",
1093
+ "module": "multiproc",
1094
+ "functions": [
1095
+ "finish_subsegment"
1096
+ ],
1097
+ "classes": [
1098
+ "MpWriter",
1099
+ "MultiSegmentWriter",
1100
+ "SerialMpWriter",
1101
+ "SubWriterTask"
1102
+ ],
1103
+ "function_signatures": {
1104
+ "finish_subsegment": [
1105
+ "writer",
1106
+ "k"
1107
+ ]
1108
+ },
1109
+ "description": "Discovered via AST scan"
1110
+ },
1111
+ {
1112
+ "package": "src.whoosh",
1113
+ "module": "reading",
1114
+ "functions": [
1115
+ "combine_terminfos"
1116
+ ],
1117
+ "classes": [
1118
+ "EmptyReader",
1119
+ "IndexReader",
1120
+ "MultiCursor",
1121
+ "MultiReader",
1122
+ "ReaderClosed",
1123
+ "SegmentReader",
1124
+ "TermInfo",
1125
+ "TermNotFound"
1126
+ ],
1127
+ "function_signatures": {
1128
+ "combine_terminfos": [
1129
+ "tis"
1130
+ ]
1131
+ },
1132
+ "description": "Discovered via AST scan"
1133
+ },
1134
+ {
1135
+ "package": "src.whoosh",
1136
+ "module": "scoring",
1137
+ "functions": [
1138
+ "bm25",
1139
+ "dfree",
1140
+ "pl2"
1141
+ ],
1142
+ "classes": [
1143
+ "BM25F",
1144
+ "BM25FScorer",
1145
+ "BaseScorer",
1146
+ "DFree",
1147
+ "DFreeScorer",
1148
+ "DebugModel",
1149
+ "DebugScorer",
1150
+ "Frequency",
1151
+ "FunctionWeighting",
1152
+ "MultiWeighting",
1153
+ "PL2",
1154
+ "PL2Scorer",
1155
+ "ReverseWeighting",
1156
+ "TF_IDF",
1157
+ "TF_IDFScorer",
1158
+ "WeightLengthScorer",
1159
+ "WeightScorer",
1160
+ "Weighting",
1161
+ "WeightingModel"
1162
+ ],
1163
+ "function_signatures": {
1164
+ "bm25": [
1165
+ "idf",
1166
+ "tf",
1167
+ "fl",
1168
+ "avgfl",
1169
+ "B",
1170
+ "K1"
1171
+ ],
1172
+ "dfree": [
1173
+ "tf",
1174
+ "cf",
1175
+ "qf",
1176
+ "dl",
1177
+ "fl"
1178
+ ],
1179
+ "pl2": [
1180
+ "tf",
1181
+ "cf",
1182
+ "qf",
1183
+ "dc",
1184
+ "fl",
1185
+ "avgfl",
1186
+ "c"
1187
+ ]
1188
+ },
1189
+ "description": "Discovered via AST scan"
1190
+ },
1191
+ {
1192
+ "package": "src.whoosh",
1193
+ "module": "searching",
1194
+ "functions": [],
1195
+ "classes": [
1196
+ "Hit",
1197
+ "NoTermsException",
1198
+ "Results",
1199
+ "ResultsPage",
1200
+ "SearchContext",
1201
+ "Searcher",
1202
+ "TimeLimit"
1203
+ ],
1204
+ "function_signatures": {},
1205
+ "description": "Discovered via AST scan"
1206
+ },
1207
+ {
1208
+ "package": "src.whoosh",
1209
+ "module": "sorting",
1210
+ "functions": [
1211
+ "add_sortable"
1212
+ ],
1213
+ "classes": [
1214
+ "Best",
1215
+ "Categorizer",
1216
+ "ColumnCategorizer",
1217
+ "Count",
1218
+ "DateRangeFacet",
1219
+ "FacetMap",
1220
+ "FacetType",
1221
+ "Facets",
1222
+ "FieldFacet",
1223
+ "FunctionFacet",
1224
+ "MultiFacet",
1225
+ "OrderedList",
1226
+ "OverlappingCategorizer",
1227
+ "PostingCategorizer",
1228
+ "QueryFacet",
1229
+ "RangeFacet",
1230
+ "ReversedColumnCategorizer",
1231
+ "ScoreFacet",
1232
+ "StoredFieldFacet",
1233
+ "TranslateFacet",
1234
+ "UnorderedList"
1235
+ ],
1236
+ "function_signatures": {
1237
+ "add_sortable": [
1238
+ "writer",
1239
+ "fieldname",
1240
+ "facet",
1241
+ "column"
1242
+ ]
1243
+ },
1244
+ "description": "Discovered via AST scan"
1245
+ },
1246
+ {
1247
+ "package": "src.whoosh",
1248
+ "module": "spelling",
1249
+ "functions": [],
1250
+ "classes": [
1251
+ "Correction",
1252
+ "Corrector",
1253
+ "ListCorrector",
1254
+ "MultiCorrector",
1255
+ "QueryCorrector",
1256
+ "ReaderCorrector",
1257
+ "SimpleQueryCorrector"
1258
+ ],
1259
+ "function_signatures": {},
1260
+ "description": "Discovered via AST scan"
1261
+ },
1262
+ {
1263
+ "package": "src.whoosh",
1264
+ "module": "writing",
1265
+ "functions": [
1266
+ "CLEAR",
1267
+ "MERGE_SMALL",
1268
+ "NO_MERGE",
1269
+ "OPTIMIZE",
1270
+ "add_spelling",
1271
+ "groupmanager"
1272
+ ],
1273
+ "classes": [
1274
+ "AsyncWriter",
1275
+ "BufferedWriter",
1276
+ "IndexWriter",
1277
+ "IndexingError",
1278
+ "PostingPool",
1279
+ "SegmentWriter"
1280
+ ],
1281
+ "function_signatures": {
1282
+ "groupmanager": [
1283
+ "writer"
1284
+ ],
1285
+ "NO_MERGE": [
1286
+ "writer",
1287
+ "segments"
1288
+ ],
1289
+ "MERGE_SMALL": [
1290
+ "writer",
1291
+ "segments"
1292
+ ],
1293
+ "OPTIMIZE": [
1294
+ "writer",
1295
+ "segments"
1296
+ ],
1297
+ "CLEAR": [
1298
+ "writer",
1299
+ "segments"
1300
+ ],
1301
+ "add_spelling": [
1302
+ "ix",
1303
+ "fieldnames",
1304
+ "commit"
1305
+ ]
1306
+ },
1307
+ "description": "Discovered via AST scan"
1308
+ },
1309
+ {
1310
+ "package": "src.whoosh.analysis",
1311
+ "module": "acore",
1312
+ "functions": [
1313
+ "entoken",
1314
+ "unstopped"
1315
+ ],
1316
+ "classes": [
1317
+ "Composable",
1318
+ "CompositionError",
1319
+ "Token"
1320
+ ],
1321
+ "function_signatures": {
1322
+ "unstopped": [
1323
+ "tokenstream"
1324
+ ],
1325
+ "entoken": [
1326
+ "textstream",
1327
+ "positions",
1328
+ "chars",
1329
+ "start_pos",
1330
+ "start_char"
1331
+ ]
1332
+ },
1333
+ "description": "Discovered via AST scan"
1334
+ },
1335
+ {
1336
+ "package": "src.whoosh.analysis",
1337
+ "module": "analyzers",
1338
+ "functions": [
1339
+ "FancyAnalyzer",
1340
+ "IDAnalyzer",
1341
+ "KeywordAnalyzer",
1342
+ "LanguageAnalyzer",
1343
+ "RegexAnalyzer",
1344
+ "SimpleAnalyzer",
1345
+ "StandardAnalyzer",
1346
+ "StemmingAnalyzer"
1347
+ ],
1348
+ "classes": [
1349
+ "Analyzer",
1350
+ "CompositeAnalyzer"
1351
+ ],
1352
+ "function_signatures": {
1353
+ "IDAnalyzer": [
1354
+ "lowercase"
1355
+ ],
1356
+ "KeywordAnalyzer": [
1357
+ "lowercase",
1358
+ "commas"
1359
+ ],
1360
+ "RegexAnalyzer": [
1361
+ "expression",
1362
+ "gaps"
1363
+ ],
1364
+ "SimpleAnalyzer": [
1365
+ "expression",
1366
+ "gaps"
1367
+ ],
1368
+ "StandardAnalyzer": [
1369
+ "expression",
1370
+ "stoplist",
1371
+ "minsize",
1372
+ "maxsize",
1373
+ "gaps"
1374
+ ],
1375
+ "StemmingAnalyzer": [
1376
+ "expression",
1377
+ "stoplist",
1378
+ "minsize",
1379
+ "maxsize",
1380
+ "gaps",
1381
+ "stemfn",
1382
+ "ignore",
1383
+ "cachesize"
1384
+ ],
1385
+ "FancyAnalyzer": [
1386
+ "expression",
1387
+ "stoplist",
1388
+ "minsize",
1389
+ "maxsize",
1390
+ "gaps",
1391
+ "splitwords",
1392
+ "splitnums",
1393
+ "mergewords",
1394
+ "mergenums"
1395
+ ],
1396
+ "LanguageAnalyzer": [
1397
+ "lang",
1398
+ "expression",
1399
+ "gaps",
1400
+ "cachesize"
1401
+ ]
1402
+ },
1403
+ "description": "Discovered via AST scan"
1404
+ },
1405
+ {
1406
+ "package": "src.whoosh.analysis",
1407
+ "module": "filters",
1408
+ "functions": [],
1409
+ "classes": [
1410
+ "CharsetFilter",
1411
+ "DelimitedAttributeFilter",
1412
+ "Filter",
1413
+ "LoggingFilter",
1414
+ "LowercaseFilter",
1415
+ "MultiFilter",
1416
+ "PassFilter",
1417
+ "ReverseTextFilter",
1418
+ "StopFilter",
1419
+ "StripFilter",
1420
+ "SubstitutionFilter",
1421
+ "TeeFilter"
1422
+ ],
1423
+ "function_signatures": {},
1424
+ "description": "Discovered via AST scan"
1425
+ },
1426
+ {
1427
+ "package": "src.whoosh.analysis",
1428
+ "module": "intraword",
1429
+ "functions": [],
1430
+ "classes": [
1431
+ "BiWordFilter",
1432
+ "CompoundWordFilter",
1433
+ "IntraWordFilter",
1434
+ "ShingleFilter"
1435
+ ],
1436
+ "function_signatures": {},
1437
+ "description": "Discovered via AST scan"
1438
+ },
1439
+ {
1440
+ "package": "src.whoosh.analysis",
1441
+ "module": "morph",
1442
+ "functions": [],
1443
+ "classes": [
1444
+ "DoubleMetaphoneFilter",
1445
+ "PyStemmerFilter",
1446
+ "StemFilter"
1447
+ ],
1448
+ "function_signatures": {},
1449
+ "description": "Discovered via AST scan"
1450
+ },
1451
+ {
1452
+ "package": "src.whoosh.analysis",
1453
+ "module": "ngrams",
1454
+ "functions": [
1455
+ "NgramAnalyzer",
1456
+ "NgramWordAnalyzer"
1457
+ ],
1458
+ "classes": [
1459
+ "NgramFilter",
1460
+ "NgramTokenizer"
1461
+ ],
1462
+ "function_signatures": {
1463
+ "NgramAnalyzer": [
1464
+ "minsize",
1465
+ "maxsize"
1466
+ ],
1467
+ "NgramWordAnalyzer": [
1468
+ "minsize",
1469
+ "maxsize",
1470
+ "tokenizer",
1471
+ "at"
1472
+ ]
1473
+ },
1474
+ "description": "Discovered via AST scan"
1475
+ },
1476
+ {
1477
+ "package": "src.whoosh.analysis",
1478
+ "module": "tokenizers",
1479
+ "functions": [
1480
+ "CommaSeparatedTokenizer",
1481
+ "SpaceSeparatedTokenizer"
1482
+ ],
1483
+ "classes": [
1484
+ "CharsetTokenizer",
1485
+ "IDTokenizer",
1486
+ "PathTokenizer",
1487
+ "RegexTokenizer",
1488
+ "Tokenizer"
1489
+ ],
1490
+ "function_signatures": {
1491
+ "SpaceSeparatedTokenizer": [],
1492
+ "CommaSeparatedTokenizer": []
1493
+ },
1494
+ "description": "Discovered via AST scan"
1495
+ },
1496
+ {
1497
+ "package": "src.whoosh.automata",
1498
+ "module": "fsa",
1499
+ "functions": [
1500
+ "add_suffix",
1501
+ "basic_nfa",
1502
+ "charset_nfa",
1503
+ "choice_nfa",
1504
+ "concat_nfa",
1505
+ "dot_nfa",
1506
+ "epsilon_nfa",
1507
+ "find_all_matches",
1508
+ "intersection",
1509
+ "optional_nfa",
1510
+ "plus_nfa",
1511
+ "product",
1512
+ "renumber_dfa",
1513
+ "reverse_nfa",
1514
+ "star_nfa",
1515
+ "string_nfa",
1516
+ "strings_dfa",
1517
+ "u_to_utf8",
1518
+ "union"
1519
+ ],
1520
+ "classes": [
1521
+ "DFA",
1522
+ "DMNode",
1523
+ "FSA",
1524
+ "Marker",
1525
+ "NFA"
1526
+ ],
1527
+ "function_signatures": {
1528
+ "renumber_dfa": [
1529
+ "dfa",
1530
+ "base"
1531
+ ],
1532
+ "u_to_utf8": [
1533
+ "dfa",
1534
+ "base"
1535
+ ],
1536
+ "find_all_matches": [
1537
+ "dfa",
1538
+ "lookup_func",
1539
+ "first"
1540
+ ],
1541
+ "reverse_nfa": [
1542
+ "n"
1543
+ ],
1544
+ "product": [
1545
+ "dfa1",
1546
+ "op",
1547
+ "dfa2"
1548
+ ],
1549
+ "intersection": [
1550
+ "dfa1",
1551
+ "dfa2"
1552
+ ],
1553
+ "union": [
1554
+ "dfa1",
1555
+ "dfa2"
1556
+ ],
1557
+ "epsilon_nfa": [],
1558
+ "dot_nfa": [],
1559
+ "basic_nfa": [
1560
+ "label"
1561
+ ],
1562
+ "charset_nfa": [
1563
+ "labels"
1564
+ ],
1565
+ "string_nfa": [
1566
+ "string"
1567
+ ],
1568
+ "choice_nfa": [
1569
+ "n1",
1570
+ "n2"
1571
+ ],
1572
+ "concat_nfa": [
1573
+ "n1",
1574
+ "n2"
1575
+ ],
1576
+ "star_nfa": [
1577
+ "n"
1578
+ ],
1579
+ "plus_nfa": [
1580
+ "n"
1581
+ ],
1582
+ "optional_nfa": [
1583
+ "n"
1584
+ ],
1585
+ "strings_dfa": [
1586
+ "strings"
1587
+ ],
1588
+ "add_suffix": [
1589
+ "dfa",
1590
+ "nodes",
1591
+ "last",
1592
+ "downto",
1593
+ "seen"
1594
+ ]
1595
+ },
1596
+ "description": "Discovered via AST scan"
1597
+ },
1598
+ {
1599
+ "package": "src.whoosh.automata",
1600
+ "module": "glob",
1601
+ "functions": [
1602
+ "glob_automaton",
1603
+ "parse_glob"
1604
+ ],
1605
+ "classes": [],
1606
+ "function_signatures": {
1607
+ "parse_glob": [
1608
+ "pattern",
1609
+ "_glob_multi",
1610
+ "_glob_single",
1611
+ "_glob_range1",
1612
+ "_glob_range2"
1613
+ ],
1614
+ "glob_automaton": [
1615
+ "pattern"
1616
+ ]
1617
+ },
1618
+ "description": "Discovered via AST scan"
1619
+ },
1620
+ {
1621
+ "package": "src.whoosh.automata",
1622
+ "module": "lev",
1623
+ "functions": [
1624
+ "levenshtein_automaton"
1625
+ ],
1626
+ "classes": [],
1627
+ "function_signatures": {
1628
+ "levenshtein_automaton": [
1629
+ "term",
1630
+ "k",
1631
+ "prefix"
1632
+ ]
1633
+ },
1634
+ "description": "Discovered via AST scan"
1635
+ },
1636
+ {
1637
+ "package": "src.whoosh.automata",
1638
+ "module": "nfa",
1639
+ "functions": [
1640
+ "advance",
1641
+ "alt",
1642
+ "concat",
1643
+ "fixup",
1644
+ "one_or_more",
1645
+ "regex_limit",
1646
+ "run",
1647
+ "zero_or_more",
1648
+ "zero_or_one"
1649
+ ],
1650
+ "classes": [
1651
+ "Any",
1652
+ "Char",
1653
+ "Instruction",
1654
+ "Jmp",
1655
+ "Label",
1656
+ "Lit",
1657
+ "Match",
1658
+ "Split",
1659
+ "Thread",
1660
+ "ThreadList"
1661
+ ],
1662
+ "function_signatures": {
1663
+ "concat": [
1664
+ "e1",
1665
+ "e2"
1666
+ ],
1667
+ "alt": [
1668
+ "e1",
1669
+ "e2"
1670
+ ],
1671
+ "zero_or_one": [
1672
+ "e"
1673
+ ],
1674
+ "zero_or_more": [
1675
+ "e"
1676
+ ],
1677
+ "one_or_more": [
1678
+ "e"
1679
+ ],
1680
+ "fixup": [
1681
+ "program"
1682
+ ],
1683
+ "advance": [
1684
+ "thread",
1685
+ "arc",
1686
+ "c"
1687
+ ],
1688
+ "run": [
1689
+ "graph",
1690
+ "program",
1691
+ "address"
1692
+ ],
1693
+ "regex_limit": [
1694
+ "graph",
1695
+ "mode",
1696
+ "program",
1697
+ "address"
1698
+ ]
1699
+ },
1700
+ "description": "Discovered via AST scan"
1701
+ },
1702
+ {
1703
+ "package": "src.whoosh.automata",
1704
+ "module": "reg",
1705
+ "functions": [
1706
+ "parse"
1707
+ ],
1708
+ "classes": [
1709
+ "RegexBuilder"
1710
+ ],
1711
+ "function_signatures": {
1712
+ "parse": [
1713
+ "pattern"
1714
+ ]
1715
+ },
1716
+ "description": "Discovered via AST scan"
1717
+ },
1718
+ {
1719
+ "package": "src.whoosh",
1720
+ "module": "codec",
1721
+ "functions": [
1722
+ "default_codec"
1723
+ ],
1724
+ "classes": [],
1725
+ "function_signatures": {
1726
+ "default_codec": []
1727
+ },
1728
+ "description": "Discovered via AST scan"
1729
+ },
1730
+ {
1731
+ "package": "src.whoosh.codec",
1732
+ "module": "base",
1733
+ "functions": [],
1734
+ "classes": [
1735
+ "Automata",
1736
+ "Codec",
1737
+ "EmptyCursor",
1738
+ "FieldCursor",
1739
+ "FieldWriter",
1740
+ "MultiPerDocumentReader",
1741
+ "OutOfOrderError",
1742
+ "PerDocWriterWithColumns",
1743
+ "PerDocumentReader",
1744
+ "PerDocumentWriter",
1745
+ "PostingsWriter",
1746
+ "Segment",
1747
+ "TermsReader",
1748
+ "WrappingCodec",
1749
+ "WrappingSegment"
1750
+ ],
1751
+ "function_signatures": {},
1752
+ "description": "Discovered via AST scan"
1753
+ },
1754
+ {
1755
+ "package": "src.whoosh.codec",
1756
+ "module": "memory",
1757
+ "functions": [],
1758
+ "classes": [
1759
+ "MemFieldWriter",
1760
+ "MemPerDocReader",
1761
+ "MemPerDocWriter",
1762
+ "MemSegment",
1763
+ "MemTermsReader",
1764
+ "MemWriter",
1765
+ "MemoryCodec"
1766
+ ],
1767
+ "function_signatures": {},
1768
+ "description": "Discovered via AST scan"
1769
+ },
1770
+ {
1771
+ "package": "src.whoosh.codec",
1772
+ "module": "plaintext",
1773
+ "functions": [],
1774
+ "classes": [
1775
+ "LineReader",
1776
+ "LineWriter",
1777
+ "PlainFieldWriter",
1778
+ "PlainPerDocReader",
1779
+ "PlainPerDocWriter",
1780
+ "PlainSegment",
1781
+ "PlainTermsReader",
1782
+ "PlainTextCodec"
1783
+ ],
1784
+ "function_signatures": {},
1785
+ "description": "Discovered via AST scan"
1786
+ },
1787
+ {
1788
+ "package": "src.whoosh.codec",
1789
+ "module": "whoosh3",
1790
+ "functions": [],
1791
+ "classes": [
1792
+ "W3Codec",
1793
+ "W3FieldCursor",
1794
+ "W3FieldWriter",
1795
+ "W3LeafMatcher",
1796
+ "W3PerDocReader",
1797
+ "W3PerDocWriter",
1798
+ "W3PostingsWriter",
1799
+ "W3Segment",
1800
+ "W3TermInfo",
1801
+ "W3TermsReader"
1802
+ ],
1803
+ "function_signatures": {},
1804
+ "description": "Discovered via AST scan"
1805
+ },
1806
+ {
1807
+ "package": "src.whoosh.filedb",
1808
+ "module": "compound",
1809
+ "functions": [],
1810
+ "classes": [
1811
+ "CompoundStorage",
1812
+ "CompoundWriter",
1813
+ "SubFile"
1814
+ ],
1815
+ "function_signatures": {},
1816
+ "description": "Discovered via AST scan"
1817
+ },
1818
+ {
1819
+ "package": "src.whoosh.filedb",
1820
+ "module": "filestore",
1821
+ "functions": [
1822
+ "copy_storage",
1823
+ "copy_to_ram"
1824
+ ],
1825
+ "classes": [
1826
+ "FileStorage",
1827
+ "OverlayStorage",
1828
+ "RamStorage",
1829
+ "ReadOnlyError",
1830
+ "Storage",
1831
+ "StorageError"
1832
+ ],
1833
+ "function_signatures": {
1834
+ "copy_storage": [
1835
+ "sourcestore",
1836
+ "deststore"
1837
+ ],
1838
+ "copy_to_ram": [
1839
+ "storage"
1840
+ ]
1841
+ },
1842
+ "description": "Discovered via AST scan"
1843
+ },
1844
+ {
1845
+ "package": "src.whoosh.filedb",
1846
+ "module": "filetables",
1847
+ "functions": [
1848
+ "cdb_hash",
1849
+ "crc_hash",
1850
+ "md5_hash"
1851
+ ],
1852
+ "classes": [
1853
+ "FieldedOrderedHashReader",
1854
+ "FieldedOrderedHashWriter",
1855
+ "FileFormatError",
1856
+ "HashReader",
1857
+ "HashWriter",
1858
+ "OrderedHashReader",
1859
+ "OrderedHashWriter"
1860
+ ],
1861
+ "function_signatures": {
1862
+ "cdb_hash": [
1863
+ "key"
1864
+ ],
1865
+ "md5_hash": [
1866
+ "key"
1867
+ ],
1868
+ "crc_hash": [
1869
+ "key"
1870
+ ]
1871
+ },
1872
+ "description": "Discovered via AST scan"
1873
+ },
1874
+ {
1875
+ "package": "src.whoosh.filedb",
1876
+ "module": "gae",
1877
+ "functions": [],
1878
+ "classes": [
1879
+ "DatastoreFile",
1880
+ "DatastoreStorage",
1881
+ "MemcacheLock"
1882
+ ],
1883
+ "function_signatures": {},
1884
+ "description": "Discovered via AST scan"
1885
+ },
1886
+ {
1887
+ "package": "src.whoosh.filedb",
1888
+ "module": "structfile",
1889
+ "functions": [],
1890
+ "classes": [
1891
+ "BufferFile",
1892
+ "ChecksumFile",
1893
+ "StructFile"
1894
+ ],
1895
+ "function_signatures": {},
1896
+ "description": "Discovered via AST scan"
1897
+ },
1898
+ {
1899
+ "package": "src.whoosh",
1900
+ "module": "lang",
1901
+ "functions": [
1902
+ "has_stemmer",
1903
+ "has_stopwords",
1904
+ "stemmer_for_language",
1905
+ "stopwords_for_language",
1906
+ "two_letter_code"
1907
+ ],
1908
+ "classes": [
1909
+ "NoStemmer",
1910
+ "NoStopWords"
1911
+ ],
1912
+ "function_signatures": {
1913
+ "two_letter_code": [
1914
+ "name"
1915
+ ],
1916
+ "has_stemmer": [
1917
+ "lang"
1918
+ ],
1919
+ "has_stopwords": [
1920
+ "lang"
1921
+ ],
1922
+ "stemmer_for_language": [
1923
+ "lang"
1924
+ ],
1925
+ "stopwords_for_language": [
1926
+ "lang"
1927
+ ]
1928
+ },
1929
+ "description": "Discovered via AST scan"
1930
+ },
1931
+ {
1932
+ "package": "src.whoosh.lang",
1933
+ "module": "dmetaphone",
1934
+ "functions": [
1935
+ "double_metaphone"
1936
+ ],
1937
+ "classes": [],
1938
+ "function_signatures": {
1939
+ "double_metaphone": [
1940
+ "text"
1941
+ ]
1942
+ },
1943
+ "description": "Discovered via AST scan"
1944
+ },
1945
+ {
1946
+ "package": "src.whoosh.lang",
1947
+ "module": "isri",
1948
+ "functions": [],
1949
+ "classes": [
1950
+ "ISRIStemmer"
1951
+ ],
1952
+ "function_signatures": {},
1953
+ "description": "Discovered via AST scan"
1954
+ },
1955
+ {
1956
+ "package": "src.whoosh.lang",
1957
+ "module": "lovins",
1958
+ "functions": [
1959
+ "A",
1960
+ "B",
1961
+ "C",
1962
+ "D",
1963
+ "E",
1964
+ "F",
1965
+ "G",
1966
+ "H",
1967
+ "I",
1968
+ "J",
1969
+ "K",
1970
+ "L",
1971
+ "M",
1972
+ "N",
1973
+ "O",
1974
+ "P",
1975
+ "Q",
1976
+ "R",
1977
+ "S",
1978
+ "T",
1979
+ "U",
1980
+ "V",
1981
+ "W",
1982
+ "X",
1983
+ "Y",
1984
+ "Z",
1985
+ "a",
1986
+ "b",
1987
+ "c",
1988
+ "fix_ending",
1989
+ "remove_ending",
1990
+ "stem"
1991
+ ],
1992
+ "classes": [],
1993
+ "function_signatures": {
1994
+ "A": [
1995
+ "base"
1996
+ ],
1997
+ "B": [
1998
+ "base"
1999
+ ],
2000
+ "C": [
2001
+ "base"
2002
+ ],
2003
+ "D": [
2004
+ "base"
2005
+ ],
2006
+ "E": [
2007
+ "base"
2008
+ ],
2009
+ "F": [
2010
+ "base"
2011
+ ],
2012
+ "G": [
2013
+ "base"
2014
+ ],
2015
+ "H": [
2016
+ "base"
2017
+ ],
2018
+ "I": [
2019
+ "base"
2020
+ ],
2021
+ "J": [
2022
+ "base"
2023
+ ],
2024
+ "K": [
2025
+ "base"
2026
+ ],
2027
+ "L": [
2028
+ "base"
2029
+ ],
2030
+ "M": [
2031
+ "base"
2032
+ ],
2033
+ "N": [
2034
+ "base"
2035
+ ],
2036
+ "O": [
2037
+ "base"
2038
+ ],
2039
+ "P": [
2040
+ "base"
2041
+ ],
2042
+ "Q": [
2043
+ "base"
2044
+ ],
2045
+ "R": [
2046
+ "base"
2047
+ ],
2048
+ "S": [
2049
+ "base"
2050
+ ],
2051
+ "T": [
2052
+ "base"
2053
+ ],
2054
+ "U": [
2055
+ "base"
2056
+ ],
2057
+ "V": [
2058
+ "base"
2059
+ ],
2060
+ "W": [
2061
+ "base"
2062
+ ],
2063
+ "X": [
2064
+ "base"
2065
+ ],
2066
+ "Y": [
2067
+ "base"
2068
+ ],
2069
+ "Z": [
2070
+ "base"
2071
+ ],
2072
+ "a": [
2073
+ "base"
2074
+ ],
2075
+ "b": [
2076
+ "base"
2077
+ ],
2078
+ "c": [
2079
+ "base"
2080
+ ],
2081
+ "remove_ending": [
2082
+ "word"
2083
+ ],
2084
+ "fix_ending": [
2085
+ "word"
2086
+ ],
2087
+ "stem": [
2088
+ "word"
2089
+ ]
2090
+ },
2091
+ "description": "Discovered via AST scan"
2092
+ },
2093
+ {
2094
+ "package": "src.whoosh.lang",
2095
+ "module": "morph_en",
2096
+ "functions": [
2097
+ "variations"
2098
+ ],
2099
+ "classes": [],
2100
+ "function_signatures": {
2101
+ "variations": [
2102
+ "word"
2103
+ ]
2104
+ },
2105
+ "description": "Discovered via AST scan"
2106
+ },
2107
+ {
2108
+ "package": "src.whoosh.lang",
2109
+ "module": "paicehusk",
2110
+ "functions": [],
2111
+ "classes": [
2112
+ "PaiceHuskStemmer"
2113
+ ],
2114
+ "function_signatures": {},
2115
+ "description": "Discovered via AST scan"
2116
+ },
2117
+ {
2118
+ "package": "src.whoosh.lang",
2119
+ "module": "phonetic",
2120
+ "functions": [
2121
+ "soundex_ar",
2122
+ "soundex_en",
2123
+ "soundex_esp"
2124
+ ],
2125
+ "classes": [],
2126
+ "function_signatures": {
2127
+ "soundex_en": [
2128
+ "word"
2129
+ ],
2130
+ "soundex_esp": [
2131
+ "word"
2132
+ ],
2133
+ "soundex_ar": [
2134
+ "word"
2135
+ ]
2136
+ },
2137
+ "description": "Discovered via AST scan"
2138
+ },
2139
+ {
2140
+ "package": "src.whoosh.lang",
2141
+ "module": "porter",
2142
+ "functions": [
2143
+ "stem"
2144
+ ],
2145
+ "classes": [],
2146
+ "function_signatures": {
2147
+ "stem": [
2148
+ "w"
2149
+ ]
2150
+ },
2151
+ "description": "Discovered via AST scan"
2152
+ },
2153
+ {
2154
+ "package": "src.whoosh.lang",
2155
+ "module": "porter2",
2156
+ "functions": [
2157
+ "capitalize_consonant_ys",
2158
+ "ends_with_double",
2159
+ "ends_with_short_syllable",
2160
+ "get_r1",
2161
+ "get_r2",
2162
+ "is_short_word",
2163
+ "normalize_ys",
2164
+ "remove_initial_apostrophe",
2165
+ "stem",
2166
+ "step_0",
2167
+ "step_1a",
2168
+ "step_1b",
2169
+ "step_1b_helper",
2170
+ "step_1c",
2171
+ "step_2",
2172
+ "step_2_helper",
2173
+ "step_3",
2174
+ "step_3_helper",
2175
+ "step_4",
2176
+ "step_5"
2177
+ ],
2178
+ "classes": [],
2179
+ "function_signatures": {
2180
+ "get_r1": [
2181
+ "word"
2182
+ ],
2183
+ "get_r2": [
2184
+ "word"
2185
+ ],
2186
+ "ends_with_short_syllable": [
2187
+ "word"
2188
+ ],
2189
+ "is_short_word": [
2190
+ "word"
2191
+ ],
2192
+ "remove_initial_apostrophe": [
2193
+ "word"
2194
+ ],
2195
+ "capitalize_consonant_ys": [
2196
+ "word"
2197
+ ],
2198
+ "step_0": [
2199
+ "word"
2200
+ ],
2201
+ "step_1a": [
2202
+ "word"
2203
+ ],
2204
+ "ends_with_double": [
2205
+ "word"
2206
+ ],
2207
+ "step_1b_helper": [
2208
+ "word"
2209
+ ],
2210
+ "step_1b": [
2211
+ "word",
2212
+ "r1"
2213
+ ],
2214
+ "step_1c": [
2215
+ "word"
2216
+ ],
2217
+ "step_2_helper": [
2218
+ "word",
2219
+ "r1",
2220
+ "end",
2221
+ "repl",
2222
+ "prev"
2223
+ ],
2224
+ "step_2": [
2225
+ "word",
2226
+ "r1"
2227
+ ],
2228
+ "step_3_helper": [
2229
+ "word",
2230
+ "r1",
2231
+ "r2",
2232
+ "end",
2233
+ "repl",
2234
+ "r2_necessary"
2235
+ ],
2236
+ "step_3": [
2237
+ "word",
2238
+ "r1",
2239
+ "r2"
2240
+ ],
2241
+ "step_4": [
2242
+ "word",
2243
+ "r2"
2244
+ ],
2245
+ "step_5": [
2246
+ "word",
2247
+ "r1",
2248
+ "r2"
2249
+ ],
2250
+ "normalize_ys": [
2251
+ "word"
2252
+ ],
2253
+ "stem": [
2254
+ "word"
2255
+ ]
2256
+ },
2257
+ "description": "Discovered via AST scan"
2258
+ },
2259
+ {
2260
+ "package": "src.whoosh.lang",
2261
+ "module": "wordnet",
2262
+ "functions": [
2263
+ "make_index",
2264
+ "parse_file",
2265
+ "synonyms"
2266
+ ],
2267
+ "classes": [
2268
+ "Thesaurus"
2269
+ ],
2270
+ "function_signatures": {
2271
+ "parse_file": [
2272
+ "f"
2273
+ ],
2274
+ "make_index": [
2275
+ "storage",
2276
+ "indexname",
2277
+ "word2nums",
2278
+ "num2words"
2279
+ ],
2280
+ "synonyms": [
2281
+ "word2nums",
2282
+ "num2words",
2283
+ "word"
2284
+ ]
2285
+ },
2286
+ "description": "Discovered via AST scan"
2287
+ },
2288
+ {
2289
+ "package": "src.whoosh.lang.snowball",
2290
+ "module": "danish",
2291
+ "functions": [],
2292
+ "classes": [
2293
+ "DanishStemmer"
2294
+ ],
2295
+ "function_signatures": {},
2296
+ "description": "Discovered via AST scan"
2297
+ },
2298
+ {
2299
+ "package": "src.whoosh.lang.snowball",
2300
+ "module": "dutch",
2301
+ "functions": [],
2302
+ "classes": [
2303
+ "DutchStemmer"
2304
+ ],
2305
+ "function_signatures": {},
2306
+ "description": "Discovered via AST scan"
2307
+ },
2308
+ {
2309
+ "package": "src.whoosh.lang.snowball",
2310
+ "module": "english",
2311
+ "functions": [],
2312
+ "classes": [
2313
+ "EnglishStemmer"
2314
+ ],
2315
+ "function_signatures": {},
2316
+ "description": "Discovered via AST scan"
2317
+ },
2318
+ {
2319
+ "package": "src.whoosh.lang.snowball",
2320
+ "module": "finnish",
2321
+ "functions": [],
2322
+ "classes": [
2323
+ "FinnishStemmer"
2324
+ ],
2325
+ "function_signatures": {},
2326
+ "description": "Discovered via AST scan"
2327
+ },
2328
+ {
2329
+ "package": "src.whoosh.lang.snowball",
2330
+ "module": "french",
2331
+ "functions": [],
2332
+ "classes": [
2333
+ "FrenchStemmer"
2334
+ ],
2335
+ "function_signatures": {},
2336
+ "description": "Discovered via AST scan"
2337
+ },
2338
+ {
2339
+ "package": "src.whoosh.lang.snowball",
2340
+ "module": "german",
2341
+ "functions": [],
2342
+ "classes": [
2343
+ "GermanStemmer"
2344
+ ],
2345
+ "function_signatures": {},
2346
+ "description": "Discovered via AST scan"
2347
+ },
2348
+ {
2349
+ "package": "src.whoosh.lang.snowball",
2350
+ "module": "hungarian",
2351
+ "functions": [],
2352
+ "classes": [
2353
+ "HungarianStemmer"
2354
+ ],
2355
+ "function_signatures": {},
2356
+ "description": "Discovered via AST scan"
2357
+ },
2358
+ {
2359
+ "package": "src.whoosh.lang.snowball",
2360
+ "module": "italian",
2361
+ "functions": [],
2362
+ "classes": [
2363
+ "ItalianStemmer"
2364
+ ],
2365
+ "function_signatures": {},
2366
+ "description": "Discovered via AST scan"
2367
+ },
2368
+ {
2369
+ "package": "src.whoosh.lang.snowball",
2370
+ "module": "norwegian",
2371
+ "functions": [],
2372
+ "classes": [
2373
+ "NorwegianStemmer"
2374
+ ],
2375
+ "function_signatures": {},
2376
+ "description": "Discovered via AST scan"
2377
+ },
2378
+ {
2379
+ "package": "src.whoosh.lang.snowball",
2380
+ "module": "portugese",
2381
+ "functions": [],
2382
+ "classes": [
2383
+ "PortugueseStemmer"
2384
+ ],
2385
+ "function_signatures": {},
2386
+ "description": "Discovered via AST scan"
2387
+ },
2388
+ {
2389
+ "package": "src.whoosh.lang.snowball",
2390
+ "module": "romanian",
2391
+ "functions": [],
2392
+ "classes": [
2393
+ "RomanianStemmer"
2394
+ ],
2395
+ "function_signatures": {},
2396
+ "description": "Discovered via AST scan"
2397
+ },
2398
+ {
2399
+ "package": "src.whoosh.lang.snowball",
2400
+ "module": "russian",
2401
+ "functions": [],
2402
+ "classes": [
2403
+ "RussianStemmer"
2404
+ ],
2405
+ "function_signatures": {},
2406
+ "description": "Discovered via AST scan"
2407
+ },
2408
+ {
2409
+ "package": "src.whoosh.lang.snowball",
2410
+ "module": "spanish",
2411
+ "functions": [],
2412
+ "classes": [
2413
+ "SpanishStemmer"
2414
+ ],
2415
+ "function_signatures": {},
2416
+ "description": "Discovered via AST scan"
2417
+ },
2418
+ {
2419
+ "package": "src.whoosh.lang.snowball",
2420
+ "module": "swedish",
2421
+ "functions": [],
2422
+ "classes": [
2423
+ "SwedishStemmer"
2424
+ ],
2425
+ "function_signatures": {},
2426
+ "description": "Discovered via AST scan"
2427
+ },
2428
+ {
2429
+ "package": "src.whoosh.matching",
2430
+ "module": "binary",
2431
+ "functions": [],
2432
+ "classes": [
2433
+ "AdditiveBiMatcher",
2434
+ "AndMaybeMatcher",
2435
+ "AndNotMatcher",
2436
+ "BiMatcher",
2437
+ "DisjunctionMaxMatcher",
2438
+ "IntersectionMatcher",
2439
+ "UnionMatcher"
2440
+ ],
2441
+ "function_signatures": {},
2442
+ "description": "Discovered via AST scan"
2443
+ },
2444
+ {
2445
+ "package": "src.whoosh.matching",
2446
+ "module": "combo",
2447
+ "functions": [],
2448
+ "classes": [
2449
+ "ArrayUnionMatcher",
2450
+ "CombinationMatcher",
2451
+ "PreloadedUnionMatcher"
2452
+ ],
2453
+ "function_signatures": {},
2454
+ "description": "Discovered via AST scan"
2455
+ },
2456
+ {
2457
+ "package": "src.whoosh.matching",
2458
+ "module": "mcore",
2459
+ "functions": [],
2460
+ "classes": [
2461
+ "ConstantScoreMatcher",
2462
+ "LeafMatcher",
2463
+ "ListMatcher",
2464
+ "Matcher",
2465
+ "NoQualityAvailable",
2466
+ "NullMatcherClass",
2467
+ "ReadTooFar"
2468
+ ],
2469
+ "function_signatures": {},
2470
+ "description": "Discovered via AST scan"
2471
+ },
2472
+ {
2473
+ "package": "src.whoosh.matching",
2474
+ "module": "wrappers",
2475
+ "functions": [
2476
+ "ExcludeMatcher"
2477
+ ],
2478
+ "classes": [
2479
+ "ConstantScoreWrapperMatcher",
2480
+ "CoordMatcher",
2481
+ "FilterMatcher",
2482
+ "InverseMatcher",
2483
+ "MultiMatcher",
2484
+ "RequireMatcher",
2485
+ "SingleTermMatcher",
2486
+ "WrappingMatcher"
2487
+ ],
2488
+ "function_signatures": {
2489
+ "ExcludeMatcher": [
2490
+ "child",
2491
+ "excluded",
2492
+ "boost"
2493
+ ]
2494
+ },
2495
+ "description": "Discovered via AST scan"
2496
+ },
2497
+ {
2498
+ "package": "src.whoosh.qparser",
2499
+ "module": "common",
2500
+ "functions": [
2501
+ "attach",
2502
+ "get_single_text",
2503
+ "print_debug"
2504
+ ],
2505
+ "classes": [
2506
+ "QueryParserError"
2507
+ ],
2508
+ "function_signatures": {
2509
+ "get_single_text": [
2510
+ "field",
2511
+ "text"
2512
+ ],
2513
+ "attach": [
2514
+ "q",
2515
+ "stxnode"
2516
+ ],
2517
+ "print_debug": [
2518
+ "level",
2519
+ "msg",
2520
+ "out"
2521
+ ]
2522
+ },
2523
+ "description": "Discovered via AST scan"
2524
+ },
2525
+ {
2526
+ "package": "src.whoosh.qparser",
2527
+ "module": "dateparse",
2528
+ "functions": [
2529
+ "print_debug"
2530
+ ],
2531
+ "classes": [
2532
+ "Bag",
2533
+ "Choice",
2534
+ "Combo",
2535
+ "DateParseError",
2536
+ "DateParser",
2537
+ "DateParserPlugin",
2538
+ "DateRangeNode",
2539
+ "DateTagger",
2540
+ "DateTimeNode",
2541
+ "Daynames",
2542
+ "English",
2543
+ "Month",
2544
+ "MultiBase",
2545
+ "Optional",
2546
+ "ParserBase",
2547
+ "PlusMinus",
2548
+ "Props",
2549
+ "Regex",
2550
+ "Sequence",
2551
+ "Time12",
2552
+ "ToEnd"
2553
+ ],
2554
+ "function_signatures": {
2555
+ "print_debug": [
2556
+ "level",
2557
+ "msg"
2558
+ ]
2559
+ },
2560
+ "description": "Discovered via AST scan"
2561
+ },
2562
+ {
2563
+ "package": "src.whoosh.qparser",
2564
+ "module": "default",
2565
+ "functions": [
2566
+ "DisMaxParser",
2567
+ "MultifieldParser",
2568
+ "SimpleParser"
2569
+ ],
2570
+ "classes": [
2571
+ "QueryParser"
2572
+ ],
2573
+ "function_signatures": {
2574
+ "MultifieldParser": [
2575
+ "fieldnames",
2576
+ "schema",
2577
+ "fieldboosts"
2578
+ ],
2579
+ "SimpleParser": [
2580
+ "fieldname",
2581
+ "schema"
2582
+ ],
2583
+ "DisMaxParser": [
2584
+ "fieldboosts",
2585
+ "schema",
2586
+ "tiebreak"
2587
+ ]
2588
+ },
2589
+ "description": "Discovered via AST scan"
2590
+ },
2591
+ {
2592
+ "package": "src.whoosh.qparser",
2593
+ "module": "plugins",
2594
+ "functions": [],
2595
+ "classes": [
2596
+ "BoostPlugin",
2597
+ "CopyFieldPlugin",
2598
+ "EveryPlugin",
2599
+ "FieldAliasPlugin",
2600
+ "FieldsPlugin",
2601
+ "FunctionPlugin",
2602
+ "FuzzyTermPlugin",
2603
+ "GroupPlugin",
2604
+ "GtLtPlugin",
2605
+ "MultifieldPlugin",
2606
+ "OperatorsPlugin",
2607
+ "PhrasePlugin",
2608
+ "Plugin",
2609
+ "PlusMinusPlugin",
2610
+ "PrefixPlugin",
2611
+ "PseudoFieldPlugin",
2612
+ "RangePlugin",
2613
+ "RegexPlugin",
2614
+ "SequencePlugin",
2615
+ "SingleQuotePlugin",
2616
+ "TaggingPlugin",
2617
+ "WhitespacePlugin",
2618
+ "WildcardPlugin"
2619
+ ],
2620
+ "function_signatures": {},
2621
+ "description": "Discovered via AST scan"
2622
+ },
2623
+ {
2624
+ "package": "src.whoosh.qparser",
2625
+ "module": "syntax",
2626
+ "functions": [
2627
+ "to_word"
2628
+ ],
2629
+ "classes": [
2630
+ "AndGroup",
2631
+ "AndMaybeGroup",
2632
+ "AndNotGroup",
2633
+ "BinaryGroup",
2634
+ "DisMaxGroup",
2635
+ "ErrorNode",
2636
+ "FieldnameNode",
2637
+ "GroupNode",
2638
+ "InfixOperator",
2639
+ "MarkerNode",
2640
+ "NotGroup",
2641
+ "Operator",
2642
+ "OrGroup",
2643
+ "OrderedGroup",
2644
+ "PostfixOperator",
2645
+ "PrefixOperator",
2646
+ "RangeNode",
2647
+ "RequireGroup",
2648
+ "SyntaxNode",
2649
+ "TextNode",
2650
+ "Whitespace",
2651
+ "WordNode",
2652
+ "Wrapper"
2653
+ ],
2654
+ "function_signatures": {
2655
+ "to_word": [
2656
+ "n"
2657
+ ]
2658
+ },
2659
+ "description": "Discovered via AST scan"
2660
+ },
2661
+ {
2662
+ "package": "src.whoosh.qparser",
2663
+ "module": "taggers",
2664
+ "functions": [],
2665
+ "classes": [
2666
+ "FnTagger",
2667
+ "RegexTagger",
2668
+ "Tagger"
2669
+ ],
2670
+ "function_signatures": {},
2671
+ "description": "Discovered via AST scan"
2672
+ },
2673
+ {
2674
+ "package": "src.whoosh.query",
2675
+ "module": "compound",
2676
+ "functions": [
2677
+ "BooleanQuery"
2678
+ ],
2679
+ "classes": [
2680
+ "And",
2681
+ "AndMaybe",
2682
+ "AndNot",
2683
+ "BinaryQuery",
2684
+ "CompoundQuery",
2685
+ "DefaultOr",
2686
+ "DisjunctionMax",
2687
+ "Or",
2688
+ "Otherwise",
2689
+ "PreloadedOr",
2690
+ "Require",
2691
+ "SplitOr"
2692
+ ],
2693
+ "function_signatures": {
2694
+ "BooleanQuery": [
2695
+ "required",
2696
+ "should",
2697
+ "prohibited"
2698
+ ]
2699
+ },
2700
+ "description": "Discovered via AST scan"
2701
+ },
2702
+ {
2703
+ "package": "src.whoosh.query",
2704
+ "module": "nested",
2705
+ "functions": [],
2706
+ "classes": [
2707
+ "NestedChildren",
2708
+ "NestedParent"
2709
+ ],
2710
+ "function_signatures": {},
2711
+ "description": "Discovered via AST scan"
2712
+ },
2713
+ {
2714
+ "package": "src.whoosh.query",
2715
+ "module": "positional",
2716
+ "functions": [],
2717
+ "classes": [
2718
+ "Ordered",
2719
+ "Phrase",
2720
+ "Sequence"
2721
+ ],
2722
+ "function_signatures": {},
2723
+ "description": "Discovered via AST scan"
2724
+ },
2725
+ {
2726
+ "package": "src.whoosh.query",
2727
+ "module": "qcolumns",
2728
+ "functions": [],
2729
+ "classes": [
2730
+ "ColumnMatcher",
2731
+ "ColumnQuery"
2732
+ ],
2733
+ "function_signatures": {},
2734
+ "description": "Discovered via AST scan"
2735
+ },
2736
+ {
2737
+ "package": "src.whoosh.query",
2738
+ "module": "qcore",
2739
+ "functions": [
2740
+ "error_query",
2741
+ "token_lists"
2742
+ ],
2743
+ "classes": [
2744
+ "Every",
2745
+ "Highest",
2746
+ "Lowest",
2747
+ "Query",
2748
+ "QueryError"
2749
+ ],
2750
+ "function_signatures": {
2751
+ "error_query": [
2752
+ "msg",
2753
+ "q"
2754
+ ],
2755
+ "token_lists": [
2756
+ "q",
2757
+ "phrases"
2758
+ ]
2759
+ },
2760
+ "description": "Discovered via AST scan"
2761
+ },
2762
+ {
2763
+ "package": "src.whoosh.query",
2764
+ "module": "ranges",
2765
+ "functions": [],
2766
+ "classes": [
2767
+ "DateRange",
2768
+ "NumericRange",
2769
+ "RangeMixin",
2770
+ "TermRange"
2771
+ ],
2772
+ "function_signatures": {},
2773
+ "description": "Discovered via AST scan"
2774
+ },
2775
+ {
2776
+ "package": "src.whoosh.query",
2777
+ "module": "spans",
2778
+ "functions": [
2779
+ "bisect_spans"
2780
+ ],
2781
+ "classes": [
2782
+ "Span",
2783
+ "SpanBefore",
2784
+ "SpanBiMatcher",
2785
+ "SpanBiQuery",
2786
+ "SpanCondition",
2787
+ "SpanContains",
2788
+ "SpanFirst",
2789
+ "SpanNear",
2790
+ "SpanNear2",
2791
+ "SpanNot",
2792
+ "SpanOr",
2793
+ "SpanQuery",
2794
+ "SpanWrappingMatcher",
2795
+ "WrappingSpan"
2796
+ ],
2797
+ "function_signatures": {
2798
+ "bisect_spans": [
2799
+ "spans",
2800
+ "start"
2801
+ ]
2802
+ },
2803
+ "description": "Discovered via AST scan"
2804
+ },
2805
+ {
2806
+ "package": "src.whoosh.query",
2807
+ "module": "terms",
2808
+ "functions": [],
2809
+ "classes": [
2810
+ "ExpandingTerm",
2811
+ "FuzzyTerm",
2812
+ "MultiTerm",
2813
+ "PatternQuery",
2814
+ "Prefix",
2815
+ "Regex",
2816
+ "Term",
2817
+ "Variations",
2818
+ "Wildcard"
2819
+ ],
2820
+ "function_signatures": {},
2821
+ "description": "Discovered via AST scan"
2822
+ },
2823
+ {
2824
+ "package": "src.whoosh.query",
2825
+ "module": "wrappers",
2826
+ "functions": [],
2827
+ "classes": [
2828
+ "ConstantScoreQuery",
2829
+ "Not",
2830
+ "WeightingQuery",
2831
+ "WrappingQuery"
2832
+ ],
2833
+ "function_signatures": {},
2834
+ "description": "Discovered via AST scan"
2835
+ },
2836
+ {
2837
+ "package": "src.whoosh.support",
2838
+ "module": "base85",
2839
+ "functions": [
2840
+ "b85decode",
2841
+ "b85encode",
2842
+ "from_base85",
2843
+ "to_base85"
2844
+ ],
2845
+ "classes": [],
2846
+ "function_signatures": {
2847
+ "to_base85": [
2848
+ "x",
2849
+ "islong"
2850
+ ],
2851
+ "from_base85": [
2852
+ "text"
2853
+ ],
2854
+ "b85encode": [
2855
+ "text",
2856
+ "pad"
2857
+ ],
2858
+ "b85decode": [
2859
+ "text"
2860
+ ]
2861
+ },
2862
+ "description": "Discovered via AST scan"
2863
+ },
2864
+ {
2865
+ "package": "src.whoosh.support",
2866
+ "module": "bench",
2867
+ "functions": [],
2868
+ "classes": [
2869
+ "Bench",
2870
+ "Module",
2871
+ "NucularModule",
2872
+ "SolrModule",
2873
+ "Spec",
2874
+ "WhooshModule",
2875
+ "XapianModule",
2876
+ "XappyModule",
2877
+ "ZcatalogModule"
2878
+ ],
2879
+ "function_signatures": {},
2880
+ "description": "Discovered via AST scan"
2881
+ },
2882
+ {
2883
+ "package": "src.whoosh.support",
2884
+ "module": "charset",
2885
+ "functions": [
2886
+ "charset_table_to_dict",
2887
+ "charspec_to_int"
2888
+ ],
2889
+ "classes": [],
2890
+ "function_signatures": {
2891
+ "charspec_to_int": [
2892
+ "string"
2893
+ ],
2894
+ "charset_table_to_dict": [
2895
+ "tablestring"
2896
+ ]
2897
+ },
2898
+ "description": "Discovered via AST scan"
2899
+ },
2900
+ {
2901
+ "package": "src.whoosh.support",
2902
+ "module": "levenshtein",
2903
+ "functions": [
2904
+ "damerau_levenshtein",
2905
+ "levenshtein",
2906
+ "relative"
2907
+ ],
2908
+ "classes": [],
2909
+ "function_signatures": {
2910
+ "levenshtein": [
2911
+ "seq1",
2912
+ "seq2",
2913
+ "limit"
2914
+ ],
2915
+ "damerau_levenshtein": [
2916
+ "seq1",
2917
+ "seq2",
2918
+ "limit"
2919
+ ],
2920
+ "relative": [
2921
+ "a",
2922
+ "b"
2923
+ ]
2924
+ },
2925
+ "description": "Discovered via AST scan"
2926
+ },
2927
+ {
2928
+ "package": "src.whoosh.support",
2929
+ "module": "relativedelta",
2930
+ "functions": [],
2931
+ "classes": [
2932
+ "relativedelta",
2933
+ "weekday"
2934
+ ],
2935
+ "function_signatures": {},
2936
+ "description": "Discovered via AST scan"
2937
+ },
2938
+ {
2939
+ "package": "src.whoosh.support",
2940
+ "module": "unicode",
2941
+ "functions": [
2942
+ "blockname",
2943
+ "blocknum"
2944
+ ],
2945
+ "classes": [
2946
+ "blocks"
2947
+ ],
2948
+ "function_signatures": {
2949
+ "blockname": [
2950
+ "ch"
2951
+ ],
2952
+ "blocknum": [
2953
+ "ch"
2954
+ ]
2955
+ },
2956
+ "description": "Discovered via AST scan"
2957
+ },
2958
+ {
2959
+ "package": "src.whoosh",
2960
+ "module": "util",
2961
+ "functions": [
2962
+ "fib",
2963
+ "make_binary_tree",
2964
+ "make_weighted_tree",
2965
+ "random_bytes",
2966
+ "random_name",
2967
+ "synchronized",
2968
+ "unclosed"
2969
+ ],
2970
+ "classes": [],
2971
+ "function_signatures": {
2972
+ "random_name": [
2973
+ "size"
2974
+ ],
2975
+ "random_bytes": [
2976
+ "size"
2977
+ ],
2978
+ "make_binary_tree": [
2979
+ "fn",
2980
+ "args"
2981
+ ],
2982
+ "make_weighted_tree": [
2983
+ "fn",
2984
+ "ls"
2985
+ ],
2986
+ "fib": [
2987
+ "n"
2988
+ ],
2989
+ "synchronized": [
2990
+ "func"
2991
+ ],
2992
+ "unclosed": [
2993
+ "method"
2994
+ ]
2995
+ },
2996
+ "description": "Discovered via AST scan"
2997
+ },
2998
+ {
2999
+ "package": "src.whoosh.util",
3000
+ "module": "cache",
3001
+ "functions": [
3002
+ "lfu_cache",
3003
+ "unbound_cache"
3004
+ ],
3005
+ "classes": [],
3006
+ "function_signatures": {
3007
+ "unbound_cache": [
3008
+ "func"
3009
+ ],
3010
+ "lfu_cache": [
3011
+ "maxsize"
3012
+ ]
3013
+ },
3014
+ "description": "Discovered via AST scan"
3015
+ },
3016
+ {
3017
+ "package": "src.whoosh.util",
3018
+ "module": "filelock",
3019
+ "functions": [
3020
+ "try_for"
3021
+ ],
3022
+ "classes": [
3023
+ "FcntlLock",
3024
+ "LockBase",
3025
+ "MsvcrtLock"
3026
+ ],
3027
+ "function_signatures": {
3028
+ "try_for": [
3029
+ "fn",
3030
+ "timeout",
3031
+ "delay"
3032
+ ]
3033
+ },
3034
+ "description": "Discovered via AST scan"
3035
+ },
3036
+ {
3037
+ "package": "src.whoosh.util",
3038
+ "module": "loading",
3039
+ "functions": [
3040
+ "find_object"
3041
+ ],
3042
+ "classes": [
3043
+ "RenamingUnpickler"
3044
+ ],
3045
+ "function_signatures": {
3046
+ "find_object": [
3047
+ "name",
3048
+ "blacklist",
3049
+ "whitelist"
3050
+ ]
3051
+ },
3052
+ "description": "Discovered via AST scan"
3053
+ },
3054
+ {
3055
+ "package": "src.whoosh.util",
3056
+ "module": "numeric",
3057
+ "functions": [
3058
+ "bits_required",
3059
+ "byte_to_float",
3060
+ "bytes_for_bits",
3061
+ "float_to_byte",
3062
+ "float_to_sortable_long",
3063
+ "from_sortable",
3064
+ "length_to_byte",
3065
+ "max_value",
3066
+ "sortable_long_to_float",
3067
+ "split_ranges",
3068
+ "tiered_ranges",
3069
+ "to_sortable",
3070
+ "typecode_required"
3071
+ ],
3072
+ "classes": [],
3073
+ "function_signatures": {
3074
+ "bits_required": [
3075
+ "maxnum"
3076
+ ],
3077
+ "typecode_required": [
3078
+ "maxnum"
3079
+ ],
3080
+ "max_value": [
3081
+ "bitcount"
3082
+ ],
3083
+ "bytes_for_bits": [
3084
+ "bitcount"
3085
+ ],
3086
+ "to_sortable": [
3087
+ "numtype",
3088
+ "intsize",
3089
+ "signed",
3090
+ "x"
3091
+ ],
3092
+ "from_sortable": [
3093
+ "numtype",
3094
+ "intsize",
3095
+ "signed",
3096
+ "x"
3097
+ ],
3098
+ "float_to_sortable_long": [
3099
+ "x",
3100
+ "signed"
3101
+ ],
3102
+ "sortable_long_to_float": [
3103
+ "x",
3104
+ "signed"
3105
+ ],
3106
+ "split_ranges": [
3107
+ "intsize",
3108
+ "step",
3109
+ "start",
3110
+ "end"
3111
+ ],
3112
+ "tiered_ranges": [
3113
+ "numtype",
3114
+ "intsize",
3115
+ "signed",
3116
+ "start",
3117
+ "end",
3118
+ "shift_step",
3119
+ "startexcl",
3120
+ "endexcl"
3121
+ ],
3122
+ "float_to_byte": [
3123
+ "value",
3124
+ "mantissabits",
3125
+ "zeroexp"
3126
+ ],
3127
+ "byte_to_float": [
3128
+ "b",
3129
+ "mantissabits",
3130
+ "zeroexp"
3131
+ ],
3132
+ "length_to_byte": [
3133
+ "length"
3134
+ ]
3135
+ },
3136
+ "description": "Discovered via AST scan"
3137
+ },
3138
+ {
3139
+ "package": "src.whoosh.util",
3140
+ "module": "numlists",
3141
+ "functions": [
3142
+ "delta_decode",
3143
+ "delta_encode"
3144
+ ],
3145
+ "classes": [
3146
+ "ByteEncoding",
3147
+ "FixedEncoding",
3148
+ "GInts",
3149
+ "GrowableArray",
3150
+ "NumberEncoding",
3151
+ "Simple16",
3152
+ "UIntEncoding",
3153
+ "UShortEncoding",
3154
+ "Varints"
3155
+ ],
3156
+ "function_signatures": {
3157
+ "delta_encode": [
3158
+ "nums"
3159
+ ],
3160
+ "delta_decode": [
3161
+ "nums"
3162
+ ]
3163
+ },
3164
+ "description": "Discovered via AST scan"
3165
+ },
3166
+ {
3167
+ "package": "src.whoosh.util",
3168
+ "module": "testing",
3169
+ "functions": [
3170
+ "check_abstract_methods",
3171
+ "is_abstract_method",
3172
+ "timing"
3173
+ ],
3174
+ "classes": [
3175
+ "TempDir",
3176
+ "TempIndex",
3177
+ "TempStorage"
3178
+ ],
3179
+ "function_signatures": {
3180
+ "is_abstract_method": [
3181
+ "attr"
3182
+ ],
3183
+ "check_abstract_methods": [
3184
+ "base",
3185
+ "subclass"
3186
+ ],
3187
+ "timing": [
3188
+ "name"
3189
+ ]
3190
+ },
3191
+ "description": "Discovered via AST scan"
3192
+ },
3193
+ {
3194
+ "package": "src.whoosh.util",
3195
+ "module": "text",
3196
+ "functions": [
3197
+ "first_diff",
3198
+ "natural_key",
3199
+ "prefix_decode_all",
3200
+ "prefix_encode",
3201
+ "prefix_encode_all",
3202
+ "rcompile"
3203
+ ],
3204
+ "classes": [],
3205
+ "function_signatures": {
3206
+ "first_diff": [
3207
+ "a",
3208
+ "b"
3209
+ ],
3210
+ "prefix_encode": [
3211
+ "a",
3212
+ "b"
3213
+ ],
3214
+ "prefix_encode_all": [
3215
+ "ls"
3216
+ ],
3217
+ "prefix_decode_all": [
3218
+ "ls"
3219
+ ],
3220
+ "natural_key": [
3221
+ "s"
3222
+ ],
3223
+ "rcompile": [
3224
+ "pattern",
3225
+ "flags",
3226
+ "verbose"
3227
+ ]
3228
+ },
3229
+ "description": "Discovered via AST scan"
3230
+ },
3231
+ {
3232
+ "package": "src.whoosh.util",
3233
+ "module": "times",
3234
+ "functions": [
3235
+ "ceil",
3236
+ "datetime_to_long",
3237
+ "fill_in",
3238
+ "fix",
3239
+ "floor",
3240
+ "has_no_date",
3241
+ "has_no_time",
3242
+ "is_ambiguous",
3243
+ "is_void",
3244
+ "long_to_datetime",
3245
+ "relative_days",
3246
+ "timedelta_to_usecs"
3247
+ ],
3248
+ "classes": [
3249
+ "TimeError",
3250
+ "adatetime",
3251
+ "timespan"
3252
+ ],
3253
+ "function_signatures": {
3254
+ "relative_days": [
3255
+ "current_wday",
3256
+ "wday",
3257
+ "dir"
3258
+ ],
3259
+ "timedelta_to_usecs": [
3260
+ "td"
3261
+ ],
3262
+ "datetime_to_long": [
3263
+ "dt"
3264
+ ],
3265
+ "long_to_datetime": [
3266
+ "x"
3267
+ ],
3268
+ "floor": [
3269
+ "at"
3270
+ ],
3271
+ "ceil": [
3272
+ "at"
3273
+ ],
3274
+ "fill_in": [
3275
+ "at",
3276
+ "basedate",
3277
+ "units"
3278
+ ],
3279
+ "has_no_date": [
3280
+ "at"
3281
+ ],
3282
+ "has_no_time": [
3283
+ "at"
3284
+ ],
3285
+ "is_ambiguous": [
3286
+ "at"
3287
+ ],
3288
+ "is_void": [
3289
+ "at"
3290
+ ],
3291
+ "fix": [
3292
+ "at"
3293
+ ]
3294
+ },
3295
+ "description": "Discovered via AST scan"
3296
+ },
3297
+ {
3298
+ "package": "src.whoosh.util",
3299
+ "module": "varints",
3300
+ "functions": [
3301
+ "decode_signed_varint",
3302
+ "read_varint",
3303
+ "signed_varint",
3304
+ "varint",
3305
+ "varint_to_int"
3306
+ ],
3307
+ "classes": [],
3308
+ "function_signatures": {
3309
+ "varint": [
3310
+ "i"
3311
+ ],
3312
+ "varint_to_int": [
3313
+ "vi"
3314
+ ],
3315
+ "signed_varint": [
3316
+ "i"
3317
+ ],
3318
+ "decode_signed_varint": [
3319
+ "i"
3320
+ ],
3321
+ "read_varint": [
3322
+ "readfn"
3323
+ ]
3324
+ },
3325
+ "description": "Discovered via AST scan"
3326
+ },
3327
+ {
3328
+ "package": "src.whoosh.util",
3329
+ "module": "versions",
3330
+ "functions": [],
3331
+ "classes": [
3332
+ "BaseVersion",
3333
+ "SimpleVersion"
3334
+ ],
3335
+ "function_signatures": {},
3336
+ "description": "Discovered via AST scan"
3337
+ },
3338
+ {
3339
+ "package": "stress",
3340
+ "module": "test_bigindex",
3341
+ "functions": [
3342
+ "test_20000_batch",
3343
+ "test_20000_buffered",
3344
+ "test_20000_single"
3345
+ ],
3346
+ "classes": [],
3347
+ "function_signatures": {
3348
+ "test_20000_single": [],
3349
+ "test_20000_buffered": [],
3350
+ "test_20000_batch": []
3351
+ },
3352
+ "description": "Discovered via AST scan"
3353
+ },
3354
+ {
3355
+ "package": "stress",
3356
+ "module": "test_bigsort",
3357
+ "functions": [
3358
+ "test_bigsort"
3359
+ ],
3360
+ "classes": [],
3361
+ "function_signatures": {
3362
+ "test_bigsort": []
3363
+ },
3364
+ "description": "Discovered via AST scan"
3365
+ },
3366
+ {
3367
+ "package": "stress",
3368
+ "module": "test_bigtable",
3369
+ "functions": [
3370
+ "test_bigtable"
3371
+ ],
3372
+ "classes": [],
3373
+ "function_signatures": {
3374
+ "test_bigtable": []
3375
+ },
3376
+ "description": "Discovered via AST scan"
3377
+ },
3378
+ {
3379
+ "package": "stress",
3380
+ "module": "test_hugeindex",
3381
+ "functions": [
3382
+ "test_huge_postfile"
3383
+ ],
3384
+ "classes": [],
3385
+ "function_signatures": {
3386
+ "test_huge_postfile": []
3387
+ },
3388
+ "description": "Discovered via AST scan"
3389
+ },
3390
+ {
3391
+ "package": "stress",
3392
+ "module": "test_threading",
3393
+ "functions": [
3394
+ "test_readwrite"
3395
+ ],
3396
+ "classes": [],
3397
+ "function_signatures": {
3398
+ "test_readwrite": []
3399
+ },
3400
+ "description": "Discovered via AST scan"
3401
+ },
3402
+ {
3403
+ "package": "stress",
3404
+ "module": "test_update",
3405
+ "functions": [
3406
+ "test_many_updates"
3407
+ ],
3408
+ "classes": [],
3409
+ "function_signatures": {
3410
+ "test_many_updates": []
3411
+ },
3412
+ "description": "Discovered via AST scan"
3413
+ }
3414
+ ],
3415
+ "cli_commands": [],
3416
+ "import_strategy": {
3417
+ "primary": "import",
3418
+ "fallback": "blackbox",
3419
+ "confidence": 0.9
3420
+ },
3421
+ "dependencies": {
3422
+ "required": [
3423
+ "Python >= 3.6"
3424
+ ],
3425
+ "optional": []
3426
+ },
3427
+ "risk_assessment": {
3428
+ "import_feasibility": 0.9,
3429
+ "intrusiveness_risk": "low",
3430
+ "complexity": "medium"
3431
+ }
3432
+ },
3433
+ "deepwiki_analysis": {
3434
+ "repo_url": "https://github.com/mchaput/whoosh",
3435
+ "repo_name": "whoosh",
3436
+ "content": "mchaput/whoosh\nGetting Started\nDocument Structure\nSchemas and Field Types\nText Analysis Pipeline\nBuilding Indexes\nIndex Management\nAdding Documents\nStorage and Persistence\nSearching Documents\nBasic Search Operations\nQuery Language and Parsing\nResult Processing and Highlighting\nAdvanced Search Features\nScoring and Ranking\nSorting, Grouping, and Faceting\nSpelling Correction\nPerformance and Scalability\nMultiprocessing Indexing\nPerformance Optimization\nAdvanced Features\nText Classification and Clustering\nCustom Plugins and Extensions\nBenchmarking and Testing\nArchitecture and Implementation\nQuery Processing Pipeline\nStorage Architecture\nCodec System\n.travis.yml\ndocs/source/batch.rst\ndocs/source/releases/1_0.rst\nsrc/whoosh/__init__.py\nThis document introduces Whoosh, a pure-Python full-text search engine library, and provides a high-level understanding of its architecture and main components. It covers what Whoosh is, its key features, and how its major subsystems work together.\nFor detailed information about getting started with basic indexing and searching operations, seeGetting Started. For deep technical details about internal implementation, seeArchitecture and Implementation.\nWhat is Whoosh\nWhoosh is a fast, pure-Python full text indexing, search, and spell checking library developed by Matt Chaput. It provides a complete search engine solution that can index documents, parse complex queries, and return ranked search results.\nKey Characteristics:\nPure Python: No external dependencies except for optionalcached-property\ncached-property\nFull-featured: Includes indexing, searching, query parsing, highlighting, and spell checking\nFlexible: Supports multiple field types, custom analyzers, and pluggable components\nProduction-ready: Used in real applications with support for concurrent access\nCurrent Version: 2.7.4 with support for Python 2.7 and Python 3.4-3.7.\nSources:src/whoosh/__init__.py28-49setup.py29-61\nCore Architecture Overview\nWhoosh follows a layered architecture that separates concerns between data processing, storage, indexing, and searching:\nStorage BackendDocument ProcessingIndex ManagementSearch InterfaceApplication LayerUser Applicationwhoosh APISearcherResultsQueryParserHighlightingIndexIndexWriterIndexReaderSchemaField Types(TEXT, ID, NUMERIC)Analysis PipelineMatching SystemStorageCodec SystemSegment Management\nStorage Backend\nDocument Processing\nIndex Management\nSearch Interface\nApplication Layer\nUser Application\nQueryParser\nHighlighting\nIndexWriter\nIndexReader\nField Types(TEXT, ID, NUMERIC)\nAnalysis Pipeline\nMatching System\nCodec System\nSegment Management\nSources: System architecture analysis,setup.py38\nDocument Lifecycle: From Input to Search\nThe following diagram shows how documents flow through Whoosh from initial input to being searchable, mapping natural language concepts to specific code entities:\nStorage SystemIndex WritingText ProcessingSchema DefinitionDocument InputRaw DocumentDocument Fields(title, content, id, etc.)Schema classTEXT field typeID field typeNUMERIC field typeSTORED field typeAnalyzer pipelineTokenizerStopFilterStemFilterIndexWriterPosting ListsTerm StorageDocument StorageFileStorageSegmentWriterW3CodecIndex Files(.trm, .pst, .col)\nStorage System\nIndex Writing\nText Processing\nSchema Definition\nDocument Input\nRaw Document\nDocument Fields(title, content, id, etc.)\nSchema class\nTEXT field type\nID field type\nNUMERIC field type\nSTORED field type\nAnalyzer pipeline\nIndexWriter\nPosting Lists\nTerm Storage\nDocument Storage\nFileStorage\nSegmentWriter\nIndex Files(.trm, .pst, .col)\nSources: System flow analysis,docs/source/batch.rst28-37\nQuery Processing Pipeline\nThis diagram illustrates how search queries are processed, from user input to final results, showing the key classes involved:\nResult GenerationSearch ExecutionMatching SystemQuery ParsingQuery InputUser Query String'title:python AND content:search'Search Parameters(limit, sortedby, filter)QueryParserParser Plugins(MultifieldPlugin, etc.)Query Objects(Term, And, Or, Phrase)Matcher TreePosting List ReadersBoolean MatchersSearcherCollector System(TopCollector, SortingCollector)Scoring Models(BM25F, TF_IDF)ResultsHit objectsHighlighterFragment objects\nResult Generation\nSearch Execution\nMatching System\nQuery Parsing\nQuery Input\nUser Query String'title:python AND content:search'\nSearch Parameters(limit, sortedby, filter)\nQueryParser\nParser Plugins(MultifieldPlugin, etc.)\nQuery Objects(Term, And, Or, Phrase)\nMatcher Tree\nPosting List Readers\nBoolean Matchers\nCollector System(TopCollector, SortingCollector)\nScoring Models(BM25F, TF_IDF)\nHit objects\nHighlighter\nFragment objects\nSources: System flow analysis\nKey Component Relationships\nIndexWriter\nIndexReader\nQueryParser\nFileStorage\nMain Features and Capabilities\nDocument Indexing:\nFlexible schema definition with multiple field types\nConfigurable text analysis pipelines with tokenization, filtering, and stemming\nBatch and incremental indexing support\nMultiprocessing for faster indexing\nSearch and Query:\nRich query language with boolean operators, phrases, wildcards, and ranges\nPluggable query parser system for extending syntax\nMultiple scoring algorithms (BM25F, TF-IDF)\nResult highlighting and snippet generation\nAdvanced Features:\nSpell checking and correction\nFaceting and grouping of results\nSorting by multiple criteria\nCustom field types and analyzers\nFor specific implementation details, seePerformance and Scalability,Advanced Features, andCustom Plugins and Extensions.\nSources:setup.py38-42docs/source/releases/1_0.rst316-376\nGetting Started\nTo begin using Whoosh, you'll typically follow this pattern:\nDefine a Schema- Specify what fields your documents will have\nCreate an Index- Set up storage for your searchable data\nAdd Documents- Populate the index with your content\nSearch- Query the index and retrieve results\nFor detailed step-by-step instructions, seeGetting Started. For more complex scenarios involving custom field types and analyzers, seeDocument Structure.\nSources: System architecture analysis\nRefresh this wiki\nOn this page\nWhat is Whoosh\nCore Architecture Overview\nDocument Lifecycle: From Input to Search\nQuery Processing Pipeline\nKey Component Relationships\nMain Features and Capabilities\nGetting Started",
3437
+ "model": "gpt-4o-2024-08-06",
3438
+ "source": "selenium",
3439
+ "success": true
3440
+ },
3441
+ "deepwiki_options": {
3442
+ "enabled": true,
3443
+ "model": "gpt-4o-2024-08-06"
3444
+ },
3445
+ "risk": {
3446
+ "import_feasibility": 0.9,
3447
+ "intrusiveness_risk": "low",
3448
+ "complexity": "medium"
3449
+ }
3450
+ }
whoosh/mcp_output/diff_report.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Difference Report for Whoosh Project
2
+
3
+ **Repository:** Whoosh
4
+ **Project Type:** Python Library
5
+ **Main Features:** Basic Functionality
6
+ **Report Generated On:** 2026-02-07 13:00:09
7
+
8
+ ## Overview
9
+
10
+ The Whoosh project is a Python library designed to provide basic search functionality. As of the latest update, the project has introduced new files but has not modified any existing ones. The workflow status indicates a successful integration, but the test status has failed, suggesting issues that need to be addressed.
11
+
12
+ ## Difference Analysis
13
+
14
+ ### New Files
15
+ - **Total New Files:** 8
16
+ - The addition of these files suggests new features or modules have been introduced to the project. However, without modifications to existing files, it appears these changes are isolated and do not alter the current functionality.
17
+
18
+ ### Modified Files
19
+ - **Total Modified Files:** 0
20
+ - The absence of modified files indicates that the existing codebase remains unchanged. This could imply that the new files are supplementary and do not interfere with the current operations of the library.
21
+
22
+ ## Technical Analysis
23
+
24
+ ### Workflow Status
25
+ - **Status:** Success
26
+ - The successful workflow status indicates that the integration of new files was executed without errors in the build or deployment processes.
27
+
28
+ ### Test Status
29
+ - **Status:** Failed
30
+ - The failure in testing suggests that the new additions may have introduced bugs or that the new features are not functioning as intended. This requires immediate attention to ensure the reliability of the library.
31
+
32
+ ## Recommendations and Improvements
33
+
34
+ 1. **Conduct Thorough Testing:**
35
+ - Perform unit and integration tests on the new files to identify and rectify the cause of test failures.
36
+ - Ensure that the new features are compatible with existing functionalities.
37
+
38
+ 2. **Code Review:**
39
+ - Conduct a detailed code review of the new files to ensure they adhere to the project's coding standards and best practices.
40
+
41
+ 3. **Documentation Update:**
42
+ - Update the project documentation to include information about the new features and how they integrate with the existing library.
43
+
44
+ 4. **Continuous Integration:**
45
+ - Implement continuous integration practices to automatically test new changes, ensuring that future updates do not disrupt existing functionalities.
46
+
47
+ ## Deployment Information
48
+
49
+ - **Current Deployment:** The new files have been successfully integrated into the project repository, but due to test failures, deployment to production should be withheld until issues are resolved.
50
+
51
+ ## Future Planning
52
+
53
+ 1. **Bug Fixes:**
54
+ - Prioritize resolving the issues causing test failures to stabilize the project.
55
+
56
+ 2. **Feature Expansion:**
57
+ - Once stability is achieved, consider expanding the new features based on user feedback and project goals.
58
+
59
+ 3. **Community Engagement:**
60
+ - Engage with the user community to gather feedback on the new features and identify areas for improvement.
61
+
62
+ 4. **Version Control:**
63
+ - Plan for a new version release once the current issues are resolved and the new features are fully functional and tested.
64
+
65
+ ## Conclusion
66
+
67
+ The Whoosh project has introduced new files that potentially expand its functionality. However, the failure in testing highlights the need for immediate attention to ensure these additions do not compromise the library's reliability. By addressing the recommendations outlined in this report, the project can move towards a stable and enhanced version, ready for deployment and future development.
whoosh/mcp_output/mcp_plugin/__init__.py ADDED
File without changes
whoosh/mcp_output/mcp_plugin/adapter.py ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+
4
+ # Path settings
5
+ source_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), "source")
6
+ sys.path.insert(0, source_path)
7
+
8
+ # Import statements
9
+ try:
10
+ from benchmark.dictionary import VulgarTongue
11
+ from benchmark.enron import Enron
12
+ from benchmark.marc21 import author, getfields, isbn
13
+ from benchmark.reuters import Reuters
14
+ except ImportError as e:
15
+ print(f"Import error: {e}. Ensure all modules are correctly placed in the source directory.")
16
+
17
+ # Adapter class definition
18
+ class Adapter:
19
+ """
20
+ Adapter class to interface with the MCP plugin, utilizing identified classes and functions.
21
+ """
22
+
23
+ def __init__(self):
24
+ self.mode = "import"
25
+
26
+ # -------------------- Class Instance Methods --------------------
27
+
28
+ def create_vulgar_tongue_instance(self):
29
+ """
30
+ Create an instance of the VulgarTongue class.
31
+
32
+ Returns:
33
+ dict: Status of the operation and instance if successful.
34
+ """
35
+ try:
36
+ instance = VulgarTongue()
37
+ return {"status": "success", "instance": instance}
38
+ except Exception as e:
39
+ return {"status": "error", "message": f"Failed to create VulgarTongue instance: {e}"}
40
+
41
+ def create_enron_instance(self):
42
+ """
43
+ Create an instance of the Enron class.
44
+
45
+ Returns:
46
+ dict: Status of the operation and instance if successful.
47
+ """
48
+ try:
49
+ instance = Enron()
50
+ return {"status": "success", "instance": instance}
51
+ except Exception as e:
52
+ return {"status": "error", "message": f"Failed to create Enron instance: {e}"}
53
+
54
+ def create_reuters_instance(self):
55
+ """
56
+ Create an instance of the Reuters class.
57
+
58
+ Returns:
59
+ dict: Status of the operation and instance if successful.
60
+ """
61
+ try:
62
+ instance = Reuters()
63
+ return {"status": "success", "instance": instance}
64
+ except Exception as e:
65
+ return {"status": "error", "message": f"Failed to create Reuters instance: {e}"}
66
+
67
+ # -------------------- Function Call Methods --------------------
68
+
69
+ def call_author(self, *args, **kwargs):
70
+ """
71
+ Call the author function from the marc21 module.
72
+
73
+ Parameters:
74
+ *args: Positional arguments for the author function.
75
+ **kwargs: Keyword arguments for the author function.
76
+
77
+ Returns:
78
+ dict: Status of the operation and result if successful.
79
+ """
80
+ try:
81
+ result = author(*args, **kwargs)
82
+ return {"status": "success", "result": result}
83
+ except Exception as e:
84
+ return {"status": "error", "message": f"Failed to call author function: {e}"}
85
+
86
+ def call_getfields(self, *args, **kwargs):
87
+ """
88
+ Call the getfields function from the marc21 module.
89
+
90
+ Parameters:
91
+ *args: Positional arguments for the getfields function.
92
+ **kwargs: Keyword arguments for the getfields function.
93
+
94
+ Returns:
95
+ dict: Status of the operation and result if successful.
96
+ """
97
+ try:
98
+ result = getfields(*args, **kwargs)
99
+ return {"status": "success", "result": result}
100
+ except Exception as e:
101
+ return {"status": "error", "message": f"Failed to call getfields function: {e}"}
102
+
103
+ def call_isbn(self, *args, **kwargs):
104
+ """
105
+ Call the isbn function from the marc21 module.
106
+
107
+ Parameters:
108
+ *args: Positional arguments for the isbn function.
109
+ **kwargs: Keyword arguments for the isbn function.
110
+
111
+ Returns:
112
+ dict: Status of the operation and result if successful.
113
+ """
114
+ try:
115
+ result = isbn(*args, **kwargs)
116
+ return {"status": "success", "result": result}
117
+ except Exception as e:
118
+ return {"status": "error", "message": f"Failed to call isbn function: {e}"}
119
+
120
+ # -------------------- Error Handling and Fallback --------------------
121
+
122
+ def handle_import_failure(self):
123
+ """
124
+ Handle import failures gracefully, providing guidance.
125
+
126
+ Returns:
127
+ dict: Status and guidance message.
128
+ """
129
+ return {
130
+ "status": "error",
131
+ "message": "Import failed. Ensure all modules are correctly placed in the source directory."
132
+ }
133
+
134
+ # Example usage
135
+ if __name__ == "__main__":
136
+ adapter = Adapter()
137
+ print(adapter.create_vulgar_tongue_instance())
138
+ print(adapter.call_author())
whoosh/mcp_output/mcp_plugin/main.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ MCP Service Auto-Wrapper - Auto-generated
3
+ """
4
+ from mcp_service import create_app
5
+
6
+ def main():
7
+ """Main entry point"""
8
+ app = create_app()
9
+ return app
10
+
11
+ if __name__ == "__main__":
12
+ app = main()
13
+ app.run()
whoosh/mcp_output/mcp_plugin/mcp_service.py ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+
4
+ source_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), "source")
5
+ if source_path not in sys.path:
6
+ sys.path.insert(0, source_path)
7
+
8
+ from fastmcp import FastMCP
9
+
10
+ from benchmark.dictionary import VulgarTongue
11
+ from benchmark.enron import Enron
12
+ from benchmark.marc21 import author, getfields, isbn
13
+ from benchmark.reuters import Reuters
14
+
15
+ mcp = FastMCP("unknown_service")
16
+
17
+
18
+ @mcp.tool(name="vulgartongue", description="VulgarTongue class")
19
+ def vulgartongue(*args, **kwargs):
20
+ """VulgarTongue class"""
21
+ try:
22
+ if VulgarTongue is None:
23
+ return {"success": False, "result": None, "error": "Class VulgarTongue is not available, path may need adjustment"}
24
+
25
+ # MCP parameter type conversion
26
+ converted_args = []
27
+ converted_kwargs = kwargs.copy()
28
+
29
+ # Handle position argument type conversion
30
+ for arg in args:
31
+ if isinstance(arg, str):
32
+ # Try to convert to numeric type
33
+ try:
34
+ if '.' in arg:
35
+ converted_args.append(float(arg))
36
+ else:
37
+ converted_args.append(int(arg))
38
+ except ValueError:
39
+ converted_args.append(arg)
40
+ else:
41
+ converted_args.append(arg)
42
+
43
+ # Handle keyword argument type conversion
44
+ for key, value in converted_kwargs.items():
45
+ if isinstance(value, str):
46
+ try:
47
+ if '.' in value:
48
+ converted_kwargs[key] = float(value)
49
+ else:
50
+ converted_kwargs[key] = int(value)
51
+ except ValueError:
52
+ pass
53
+
54
+ instance = VulgarTongue(*converted_args, **converted_kwargs)
55
+ return {"success": True, "result": str(instance), "error": None}
56
+ except Exception as e:
57
+ return {"success": False, "result": None, "error": str(e)}
58
+
59
+ @mcp.tool(name="enron", description="Enron class")
60
+ def enron(*args, **kwargs):
61
+ """Enron class"""
62
+ try:
63
+ if Enron is None:
64
+ return {"success": False, "result": None, "error": "Class Enron is not available, path may need adjustment"}
65
+
66
+ # MCP parameter type conversion
67
+ converted_args = []
68
+ converted_kwargs = kwargs.copy()
69
+
70
+ # Handle position argument type conversion
71
+ for arg in args:
72
+ if isinstance(arg, str):
73
+ # Try to convert to numeric type
74
+ try:
75
+ if '.' in arg:
76
+ converted_args.append(float(arg))
77
+ else:
78
+ converted_args.append(int(arg))
79
+ except ValueError:
80
+ converted_args.append(arg)
81
+ else:
82
+ converted_args.append(arg)
83
+
84
+ # Handle keyword argument type conversion
85
+ for key, value in converted_kwargs.items():
86
+ if isinstance(value, str):
87
+ try:
88
+ if '.' in value:
89
+ converted_kwargs[key] = float(value)
90
+ else:
91
+ converted_kwargs[key] = int(value)
92
+ except ValueError:
93
+ pass
94
+
95
+ instance = Enron(*converted_args, **converted_kwargs)
96
+ return {"success": True, "result": str(instance), "error": None}
97
+ except Exception as e:
98
+ return {"success": False, "result": None, "error": str(e)}
99
+
100
+ @mcp.tool(name="author", description="Auto-wrapped function author")
101
+ def author(payload: dict):
102
+ try:
103
+ if author is None:
104
+ return {"success": False, "result": None, "error": "Function author is not available"}
105
+ result = author(**payload)
106
+ return {"success": True, "result": result, "error": None}
107
+ except Exception as e:
108
+ return {"success": False, "result": None, "error": str(e)}
109
+
110
+ @mcp.tool(name="getfields", description="Auto-wrapped function getfields")
111
+ def getfields(payload: dict):
112
+ try:
113
+ if getfields is None:
114
+ return {"success": False, "result": None, "error": "Function getfields is not available"}
115
+ result = getfields(**payload)
116
+ return {"success": True, "result": result, "error": None}
117
+ except Exception as e:
118
+ return {"success": False, "result": None, "error": str(e)}
119
+
120
+ @mcp.tool(name="isbn", description="Auto-wrapped function isbn")
121
+ def isbn(payload: dict):
122
+ try:
123
+ if isbn is None:
124
+ return {"success": False, "result": None, "error": "Function isbn is not available"}
125
+ result = isbn(**payload)
126
+ return {"success": True, "result": result, "error": None}
127
+ except Exception as e:
128
+ return {"success": False, "result": None, "error": str(e)}
129
+
130
+ @mcp.tool(name="reuters", description="Reuters class")
131
+ def reuters(*args, **kwargs):
132
+ """Reuters class"""
133
+ try:
134
+ if Reuters is None:
135
+ return {"success": False, "result": None, "error": "Class Reuters is not available, path may need adjustment"}
136
+
137
+ # MCP parameter type conversion
138
+ converted_args = []
139
+ converted_kwargs = kwargs.copy()
140
+
141
+ # Handle position argument type conversion
142
+ for arg in args:
143
+ if isinstance(arg, str):
144
+ # Try to convert to numeric type
145
+ try:
146
+ if '.' in arg:
147
+ converted_args.append(float(arg))
148
+ else:
149
+ converted_args.append(int(arg))
150
+ except ValueError:
151
+ converted_args.append(arg)
152
+ else:
153
+ converted_args.append(arg)
154
+
155
+ # Handle keyword argument type conversion
156
+ for key, value in converted_kwargs.items():
157
+ if isinstance(value, str):
158
+ try:
159
+ if '.' in value:
160
+ converted_kwargs[key] = float(value)
161
+ else:
162
+ converted_kwargs[key] = int(value)
163
+ except ValueError:
164
+ pass
165
+
166
+ instance = Reuters(*converted_args, **converted_kwargs)
167
+ return {"success": True, "result": str(instance), "error": None}
168
+ except Exception as e:
169
+ return {"success": False, "result": None, "error": str(e)}
170
+
171
+
172
+
173
+ def create_app():
174
+ """Create and return FastMCP application instance"""
175
+ return mcp
176
+
177
+ if __name__ == "__main__":
178
+ mcp.run(transport="http", host="0.0.0.0", port=8000)
whoosh/mcp_output/requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ fastmcp
2
+ fastapi
3
+ uvicorn[standard]
4
+ pydantic>=2.0.0
5
+ cached-property
whoosh/mcp_output/start_mcp.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ """
3
+ MCP Service Startup Entry
4
+ """
5
+ import sys
6
+ import os
7
+
8
+ project_root = os.path.dirname(os.path.abspath(__file__))
9
+ mcp_plugin_dir = os.path.join(project_root, "mcp_plugin")
10
+ if mcp_plugin_dir not in sys.path:
11
+ sys.path.insert(0, mcp_plugin_dir)
12
+
13
+ from mcp_service import create_app
14
+
15
+ def main():
16
+ """Start FastMCP service"""
17
+ app = create_app()
18
+ # Use environment variable to configure port, default 8000
19
+ port = int(os.environ.get("MCP_PORT", "8000"))
20
+
21
+ # Choose transport mode based on environment variable
22
+ transport = os.environ.get("MCP_TRANSPORT", "stdio")
23
+ if transport == "http":
24
+ app.run(transport="http", host="0.0.0.0", port=port)
25
+ else:
26
+ # Default to STDIO mode
27
+ app.run()
28
+
29
+ if __name__ == "__main__":
30
+ main()
whoosh/mcp_output/workflow_summary.json ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "repository": {
3
+ "name": "whoosh",
4
+ "url": "https://github.com/mchaput/whoosh",
5
+ "local_path": "/export/zxcpu1/shiweijie/code/ghh/Code2MCP/workspace/whoosh",
6
+ "description": "Python library",
7
+ "features": "Basic functionality",
8
+ "tech_stack": "Python",
9
+ "stars": 0,
10
+ "forks": 0,
11
+ "language": "Python",
12
+ "last_updated": "",
13
+ "complexity": "medium",
14
+ "intrusiveness_risk": "low"
15
+ },
16
+ "execution": {
17
+ "start_time": 1770440288.7033033,
18
+ "end_time": 1770440355.434905,
19
+ "duration": 66.73160195350647,
20
+ "status": "success",
21
+ "workflow_status": "success",
22
+ "nodes_executed": [
23
+ "download",
24
+ "analysis",
25
+ "env",
26
+ "generate",
27
+ "run",
28
+ "review",
29
+ "finalize"
30
+ ],
31
+ "total_files_processed": 1,
32
+ "environment_type": "unknown",
33
+ "llm_calls": 0,
34
+ "deepwiki_calls": 0
35
+ },
36
+ "tests": {
37
+ "original_project": {
38
+ "passed": false,
39
+ "details": {},
40
+ "test_coverage": "100%",
41
+ "execution_time": 0,
42
+ "test_files": []
43
+ },
44
+ "mcp_plugin": {
45
+ "passed": true,
46
+ "details": {},
47
+ "service_health": "healthy",
48
+ "startup_time": 0,
49
+ "transport_mode": "stdio",
50
+ "fastmcp_version": "unknown",
51
+ "mcp_version": "unknown"
52
+ }
53
+ },
54
+ "analysis": {
55
+ "structure": {
56
+ "packages": [
57
+ "source.src.whoosh"
58
+ ]
59
+ },
60
+ "dependencies": {
61
+ "has_environment_yml": false,
62
+ "has_requirements_txt": false,
63
+ "pyproject": false,
64
+ "setup_cfg": true,
65
+ "setup_py": true
66
+ },
67
+ "entry_points": {
68
+ "imports": [],
69
+ "cli": [],
70
+ "modules": []
71
+ },
72
+ "risk_assessment": {
73
+ "import_feasibility": 0.9,
74
+ "intrusiveness_risk": "low",
75
+ "complexity": "medium"
76
+ },
77
+ "deepwiki_analysis": {
78
+ "repo_url": "https://github.com/mchaput/whoosh",
79
+ "repo_name": "whoosh",
80
+ "content": "mchaput/whoosh\nGetting Started\nDocument Structure\nSchemas and Field Types\nText Analysis Pipeline\nBuilding Indexes\nIndex Management\nAdding Documents\nStorage and Persistence\nSearching Documents\nBasic Search Operations\nQuery Language and Parsing\nResult Processing and Highlighting\nAdvanced Search Features\nScoring and Ranking\nSorting, Grouping, and Faceting\nSpelling Correction\nPerformance and Scalability\nMultiprocessing Indexing\nPerformance Optimization\nAdvanced Features\nText Classification and Clustering\nCustom Plugins and Extensions\nBenchmarking and Testing\nArchitecture and Implementation\nQuery Processing Pipeline\nStorage Architecture\nCodec System\n.travis.yml\ndocs/source/batch.rst\ndocs/source/releases/1_0.rst\nsrc/whoosh/__init__.py\nThis document introduces Whoosh, a pure-Python full-text search engine library, and provides a high-level understanding of its architecture and main components. It covers what Whoosh is, its key features, and how its major subsystems work together.\nFor detailed information about getting started with basic indexing and searching operations, seeGetting Started. For deep technical details about internal implementation, seeArchitecture and Implementation.\nWhat is Whoosh\nWhoosh is a fast, pure-Python full text indexing, search, and spell checking library developed by Matt Chaput. It provides a complete search engine solution that can index documents, parse complex queries, and return ranked search results.\nKey Characteristics:\nPure Python: No external dependencies except for optionalcached-property\ncached-property\nFull-featured: Includes indexing, searching, query parsing, highlighting, and spell checking\nFlexible: Supports multiple field types, custom analyzers, and pluggable components\nProduction-ready: Used in real applications with support for concurrent access\nCurrent Version: 2.7.4 with support for Python 2.7 and Python 3.4-3.7.\nSources:src/whoosh/__init__.py28-49setup.py29-61\nCore Architecture Overview\nWhoosh follows a layered architecture that separates concerns between data processing, storage, indexing, and searching:\nStorage BackendDocument ProcessingIndex ManagementSearch InterfaceApplication LayerUser Applicationwhoosh APISearcherResultsQueryParserHighlightingIndexIndexWriterIndexReaderSchemaField Types(TEXT, ID, NUMERIC)Analysis PipelineMatching SystemStorageCodec SystemSegment Management\nStorage Backend\nDocument Processing\nIndex Management\nSearch Interface\nApplication Layer\nUser Application\nQueryParser\nHighlighting\nIndexWriter\nIndexReader\nField Types(TEXT, ID, NUMERIC)\nAnalysis Pipeline\nMatching System\nCodec System\nSegment Management\nSources: System architecture analysis,setup.py38\nDocument Lifecycle: From Input to Search\nThe following diagram shows how documents flow through Whoosh from initial input to being searchable, mapping natural language concepts to specific code entities:\nStorage SystemIndex WritingText ProcessingSchema DefinitionDocument InputRaw DocumentDocument Fields(title, content, id, etc.)Schema classTEXT field typeID field typeNUMERIC field typeSTORED field typeAnalyzer pipelineTokenizerStopFilterStemFilterIndexWriterPosting ListsTerm StorageDocument StorageFileStorageSegmentWriterW3CodecIndex Files(.trm, .pst, .col)\nStorage System\nIndex Writing\nText Processing\nSchema Definition\nDocument Input\nRaw Document\nDocument Fields(title, content, id, etc.)\nSchema class\nTEXT field type\nID field type\nNUMERIC field type\nSTORED field type\nAnalyzer pipeline\nIndexWriter\nPosting Lists\nTerm Storage\nDocument Storage\nFileStorage\nSegmentWriter\nIndex Files(.trm, .pst, .col)\nSources: System flow analysis,docs/source/batch.rst28-37\nQuery Processing Pipeline\nThis diagram illustrates how search queries are processed, from user input to final results, showing the key classes involved:\nResult GenerationSearch ExecutionMatching SystemQuery ParsingQuery InputUser Query String'title:python AND content:search'Search Parameters(limit, sortedby, filter)QueryParserParser Plugins(MultifieldPlugin, etc.)Query Objects(Term, And, Or, Phrase)Matcher TreePosting List ReadersBoolean MatchersSearcherCollector System(TopCollector, SortingCollector)Scoring Models(BM25F, TF_IDF)ResultsHit objectsHighlighterFragment objects\nResult Generation\nSearch Execution\nMatching System\nQuery Parsing\nQuery Input\nUser Query String'title:python AND content:search'\nSearch Parameters(limit, sortedby, filter)\nQueryParser\nParser Plugins(MultifieldPlugin, etc.)\nQuery Objects(Term, And, Or, Phrase)\nMatcher Tree\nPosting List Readers\nBoolean Matchers\nCollector System(TopCollector, SortingCollector)\nScoring Models(BM25F, TF_IDF)\nHit objects\nHighlighter\nFragment objects\nSources: System flow analysis\nKey Component Relationships\nIndexWriter\nIndexReader\nQueryParser\nFileStorage\nMain Features and Capabilities\nDocument Indexing:\nFlexible schema definition with multiple field types\nConfigurable text analysis pipelines with tokenization, filtering, and stemming\nBatch and incremental indexing support\nMultiprocessing for faster indexing\nSearch and Query:\nRich query language with boolean operators, phrases, wildcards, and ranges\nPluggable query parser system for extending syntax\nMultiple scoring algorithms (BM25F, TF-IDF)\nResult highlighting and snippet generation\nAdvanced Features:\nSpell checking and correction\nFaceting and grouping of results\nSorting by multiple criteria\nCustom field types and analyzers\nFor specific implementation details, seePerformance and Scalability,Advanced Features, andCustom Plugins and Extensions.\nSources:setup.py38-42docs/source/releases/1_0.rst316-376\nGetting Started\nTo begin using Whoosh, you'll typically follow this pattern:\nDefine a Schema- Specify what fields your documents will have\nCreate an Index- Set up storage for your searchable data\nAdd Documents- Populate the index with your content\nSearch- Query the index and retrieve results\nFor detailed step-by-step instructions, seeGetting Started. For more complex scenarios involving custom field types and analyzers, seeDocument Structure.\nSources: System architecture analysis\nRefresh this wiki\nOn this page\nWhat is Whoosh\nCore Architecture Overview\nDocument Lifecycle: From Input to Search\nQuery Processing Pipeline\nKey Component Relationships\nMain Features and Capabilities\nGetting Started",
81
+ "model": "gpt-4o-2024-08-06",
82
+ "source": "selenium",
83
+ "success": true
84
+ },
85
+ "code_complexity": {
86
+ "cyclomatic_complexity": "medium",
87
+ "cognitive_complexity": "medium",
88
+ "maintainability_index": 75
89
+ },
90
+ "security_analysis": {
91
+ "vulnerabilities_found": 0,
92
+ "security_score": 85,
93
+ "recommendations": []
94
+ }
95
+ },
96
+ "plugin_generation": {
97
+ "files_created": [
98
+ "mcp_output/start_mcp.py",
99
+ "mcp_output/mcp_plugin/__init__.py",
100
+ "mcp_output/mcp_plugin/mcp_service.py",
101
+ "mcp_output/mcp_plugin/adapter.py",
102
+ "mcp_output/mcp_plugin/main.py",
103
+ "mcp_output/requirements.txt",
104
+ "mcp_output/README_MCP.md"
105
+ ],
106
+ "main_entry": "start_mcp.py",
107
+ "requirements": [
108
+ "fastmcp>=0.1.0",
109
+ "pydantic>=2.0.0"
110
+ ],
111
+ "readme_path": "/export/zxcpu1/shiweijie/code/ghh/Code2MCP/workspace/whoosh/mcp_output/README_MCP.md",
112
+ "adapter_mode": "import",
113
+ "total_lines_of_code": 0,
114
+ "generated_files_size": 0,
115
+ "tool_endpoints": 0,
116
+ "supported_features": [
117
+ "Basic functionality"
118
+ ],
119
+ "generated_tools": [
120
+ "Basic tools",
121
+ "Health check tools",
122
+ "Version info tools"
123
+ ]
124
+ },
125
+ "code_review": {},
126
+ "errors": [],
127
+ "warnings": [],
128
+ "recommendations": [
129
+ "Improve test coverage by adding more unit tests",
130
+ "Implement continuous integration using GitHub Actions or Travis CI",
131
+ "Optimize large files by refactoring or splitting them into smaller modules",
132
+ "Update dependencies and ensure compatibility with the latest Python versions",
133
+ "Improve documentation for better clarity and user guidance",
134
+ "Implement code review processes to ensure code quality",
135
+ "Enhance performance by profiling and optimizing critical code paths",
136
+ "Add a requirements.txt or environment.yml file for better dependency management",
137
+ "Consider using a more modern package management system like Poetry",
138
+ "Improve error handling and logging for better debugging and maintenance."
139
+ ],
140
+ "performance_metrics": {
141
+ "memory_usage_mb": 0,
142
+ "cpu_usage_percent": 0,
143
+ "response_time_ms": 0,
144
+ "throughput_requests_per_second": 0
145
+ },
146
+ "deployment_info": {
147
+ "supported_platforms": [
148
+ "Linux",
149
+ "Windows",
150
+ "macOS"
151
+ ],
152
+ "python_versions": [
153
+ "3.8",
154
+ "3.9",
155
+ "3.10",
156
+ "3.11",
157
+ "3.12"
158
+ ],
159
+ "deployment_methods": [
160
+ "Docker",
161
+ "pip",
162
+ "conda"
163
+ ],
164
+ "monitoring_support": true,
165
+ "logging_configuration": "structured"
166
+ },
167
+ "execution_analysis": {
168
+ "success_factors": [
169
+ "Successful execution of all workflow nodes",
170
+ "Healthy service status of MCP plugin"
171
+ ],
172
+ "failure_reasons": [],
173
+ "overall_assessment": "excellent",
174
+ "node_performance": {
175
+ "download_time": "Completed successfully, indicating efficient data retrieval",
176
+ "analysis_time": "Completed successfully, indicating effective code analysis",
177
+ "generation_time": "Completed successfully, indicating efficient code generation",
178
+ "test_time": "Original project tests failed, but MCP plugin tests passed"
179
+ },
180
+ "resource_usage": {
181
+ "memory_efficiency": "Memory usage data not available",
182
+ "cpu_efficiency": "CPU usage data not available",
183
+ "disk_usage": "Disk usage data not available"
184
+ }
185
+ },
186
+ "technical_quality": {
187
+ "code_quality_score": 75,
188
+ "architecture_score": 80,
189
+ "performance_score": 70,
190
+ "maintainability_score": 75,
191
+ "security_score": 85,
192
+ "scalability_score": 70
193
+ }
194
+ }
whoosh/source/.hgignore ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ syntax: glob
2
+ *.pyc
3
+ *~
4
+ *.DS_Store
5
+
6
+ .idea
7
+ .settings
8
+ .coverage
9
+ .tox
10
+ .cache
11
+ nosetests.xml
12
+
13
+ build
14
+ dist
15
+ docs/build
16
+ src/Whoosh.egg-info
17
+
18
+ bmark
19
+ *testindex
20
+ benchmark/enron_index*
21
+ benchmark/reuters_index*
22
+ benchmark/dictionary_index*
23
+ benchmark/enron_cache.pickle
24
+ benchmark/enron_mail_082109.tar.gz
25
+
26
+ tmp/*
27
+ tests/tmp/*
whoosh/source/.travis.yml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dist: xenial
2
+ language: python
3
+
4
+ python:
5
+ - "2.7"
6
+ - "3.4"
7
+ - "3.5"
8
+ - "3.6"
9
+ - "3.7"
10
+
11
+ install:
12
+ - pip install pytest nose codecov coverage cached-property
13
+
14
+ script:
15
+ - nosetests --with-coverage
16
+
17
+ after_script:
18
+ - codecov
whoosh/source/LICENSE.txt ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright 2011 Matt Chaput. All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice,
7
+ this list of conditions and the following disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above copyright
10
+ notice, this list of conditions and the following disclaimer in the
11
+ documentation and/or other materials provided with the distribution.
12
+
13
+ THIS SOFTWARE IS PROVIDED BY MATT CHAPUT ``AS IS'' AND ANY EXPRESS OR
14
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
16
+ EVENT SHALL MATT CHAPUT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
17
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
19
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
20
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
22
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
+
24
+ The views and conclusions contained in the software and documentation are
25
+ those of the authors and should not be interpreted as representing official
26
+ policies, either expressed or implied, of Matt Chaput.
whoosh/source/MANIFEST.in ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ include *.txt
2
+ include benchmark/dcvgr10.txt.gz
3
+ include benchmark/reuters21578.txt.gz
4
+ include tests/english-words.10.gz
5
+ recursive-include tests *.txt *.py
6
+ recursive-include benchmark *.txt *.py
7
+ recursive-include docs *.txt *.py *.rst
8
+ recursive-include files *.txt *.py *.png *.jpg *.svg
whoosh/source/README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [![Build Status](https://travis-ci.org/whoosh-community/whoosh.svg?branch=master)](https://travis-ci.org/whoosh-community/whoosh)
2
+
3
+ About Whoosh
4
+ ============
5
+
6
+ Whoosh is a fast, featureful full-text indexing and searching library
7
+ implemented in pure Python. Programmers can use it to easily add search
8
+ functionality to their applications and websites. Every part of how Whoosh
9
+ works can be extended or replaced to meet your needs exactly.
10
+
11
+ Some of Whoosh's features include:
12
+
13
+ * Pythonic API.
14
+ * Pure-Python. No compilation or binary packages needed, no mysterious crashes.
15
+ * Fielded indexing and search.
16
+ * Fast indexing and retrieval -- faster than any other pure-Python, scoring,
17
+ full-text search solution I know of.
18
+ * Pluggable scoring algorithm (including BM25F), text analysis, storage,
19
+ posting format, etc.
20
+ * Powerful query language.
21
+ * Pure Python spell-checker (as far as I know, the only one).
22
+
23
+ Whoosh might be useful in the following circumstances:
24
+
25
+ * Anywhere a pure-Python solution is desirable to avoid having to build/compile
26
+ native libraries (or force users to build/compile them).
27
+ * As a research platform (at least for programmers that find Python easier to
28
+ read and work with than Java ;)
29
+ * When an easy-to-use Pythonic interface is more important to you than raw
30
+ speed.
31
+
32
+ Whoosh was created and is maintained by Matt Chaput. It was originally created
33
+ for use in the online help system of Side Effects Software's 3D animation
34
+ software Houdini. Side Effects Software Inc. graciously agreed to open-source
35
+ the code.
36
+
37
+ This software is licensed under the terms of the simplified BSD (A.K.A. "two
38
+ clause" or "FreeBSD") license. See LICENSE.txt for information.
39
+
40
+ Installing Whoosh
41
+ =================
42
+
43
+ If you have ``setuptools`` or ``pip`` installed, you can use ``easy_install``
44
+ or ``pip`` to download and install Whoosh automatically::
45
+
46
+ $ easy_install Whoosh
47
+
48
+ or
49
+
50
+ $ pip install Whoosh
51
+
52
+ Learning more
53
+ =============
54
+
55
+ * Read the online documentation at https://whoosh.readthedocs.org/en/latest/
56
+
57
+ * Join the Whoosh mailing list at http://groups.google.com/group/whoosh
58
+
59
+ * File bug reports and view the Whoosh wiki at
60
+ http://bitbucket.org/mchaput/whoosh/
61
+
62
+ Getting the source
63
+ ==================
64
+
65
+ Download source releases from PyPI at http://pypi.python.org/pypi/Whoosh/
66
+
67
+ You can check out the latest version of the source code using Mercurial::
68
+
69
+ hg clone http://bitbucket.org/mchaput/whoosh
70
+
whoosh/source/__init__.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ whoosh Project Package Initialization File
4
+ """
whoosh/source/benchmark/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ # -*- coding: utf-8 -*-
whoosh/source/benchmark/dcvgr10.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c94e95aa643182f66635812e18d0ae7795d687cdd5cfcaa1e51d2738f9b7ab7
3
+ size 201819
whoosh/source/benchmark/dictionary.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os.path, gzip
2
+
3
+ from whoosh import analysis, fields
4
+ from whoosh.support.bench import Bench, Spec
5
+
6
+
7
+ class VulgarTongue(Spec):
8
+ name = "dictionary"
9
+ filename = "dcvgr10.txt.gz"
10
+ headline_field = "head"
11
+
12
+ def documents(self):
13
+ path = os.path.join(self.options.dir, self.filename)
14
+ f = gzip.GzipFile(path)
15
+
16
+ head = body = None
17
+ for line in f:
18
+ line = line.decode("latin1")
19
+ if line[0].isalpha():
20
+ if head:
21
+ yield {"head": head, "body": head + body}
22
+ head, body = line.split(".", 1)
23
+ else:
24
+ body += line
25
+
26
+ if head:
27
+ yield {"head": head, "body": head + body}
28
+
29
+ def whoosh_schema(self):
30
+ ana = analysis.StemmingAnalyzer()
31
+ #ana = analysis.StandardAnalyzer()
32
+ schema = fields.Schema(head=fields.ID(stored=True),
33
+ body=fields.TEXT(analyzer=ana, stored=True))
34
+ return schema
35
+
36
+ def zcatalog_setup(self, cat):
37
+ from zcatalog import indexes #@UnresolvedImport
38
+ cat["head"] = indexes.FieldIndex(field_name="head")
39
+ cat["body"] = indexes.TextIndex(field_name="body")
40
+
41
+
42
+ if __name__ == "__main__":
43
+ Bench().run(VulgarTongue)
whoosh/source/benchmark/enron.py ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import division
2
+ import os.path, tarfile
3
+ from email import message_from_string
4
+ from marshal import dump, load
5
+ from zlib import compress, decompress
6
+
7
+ try:
8
+ import xappy
9
+ except ImportError:
10
+ pass
11
+
12
+ from whoosh import analysis, fields
13
+ from whoosh.compat import urlretrieve, next
14
+ from whoosh.support.bench import Bench, Spec
15
+ from whoosh.util import now
16
+
17
+
18
+ # Benchmark class
19
+
20
+ class Enron(Spec):
21
+ name = "enron"
22
+
23
+ enron_archive_url = "http://www.cs.cmu.edu/~enron/enron_mail_082109.tar.gz"
24
+ enron_archive_filename = "enron_mail_082109.tar.gz"
25
+ cache_filename = "enron_cache.pickle"
26
+
27
+ header_to_field = {"Date": "date", "From": "frm", "To": "to",
28
+ "Subject": "subject", "Cc": "cc", "Bcc": "bcc"}
29
+
30
+ main_field = "body"
31
+ headline_field = "subject"
32
+
33
+ field_order = ("subject", "date", "from", "to", "cc", "bcc", "body")
34
+
35
+ cachefile = None
36
+
37
+ # Functions for downloading and then reading the email archive and caching
38
+ # the messages in an easier-to-digest format
39
+
40
+ def download_archive(self, archive):
41
+ print("Downloading Enron email archive to %r..." % archive)
42
+ t = now()
43
+ urlretrieve(self.enron_archive_url, archive)
44
+ print("Downloaded in ", now() - t, "seconds")
45
+
46
+ @staticmethod
47
+ def get_texts(archive):
48
+ archive = tarfile.open(archive, "r:gz")
49
+ while True:
50
+ entry = next(archive)
51
+ archive.members = []
52
+ if entry is None:
53
+ break
54
+ f = archive.extractfile(entry)
55
+ if f is not None:
56
+ text = f.read()
57
+ yield text
58
+
59
+ @staticmethod
60
+ def get_messages(archive, headers=True):
61
+ header_to_field = Enron.header_to_field
62
+ for text in Enron.get_texts(archive):
63
+ message = message_from_string(text)
64
+ body = message.as_string().decode("latin_1")
65
+ blank = body.find("\n\n")
66
+ if blank > -1:
67
+ body = body[blank+2:]
68
+ d = {"body": body}
69
+ if headers:
70
+ for k in message.keys():
71
+ fn = header_to_field.get(k)
72
+ if not fn: continue
73
+ v = message.get(k).strip()
74
+ if v:
75
+ d[fn] = v.decode("latin_1")
76
+ yield d
77
+
78
+ def cache_messages(self, archive, cache):
79
+ print("Caching messages in %s..." % cache)
80
+
81
+ if not os.path.exists(archive):
82
+ raise Exception("Archive file %r does not exist" % archive)
83
+
84
+ t = now()
85
+ f = open(cache, "wb")
86
+ c = 0
87
+ for d in self.get_messages(archive):
88
+ c += 1
89
+ dump(d, f)
90
+ if not c % 1000: print(c)
91
+ f.close()
92
+ print("Cached messages in ", now() - t, "seconds")
93
+
94
+ def setup(self):
95
+ archive = os.path.abspath(os.path.join(self.options.dir, self.enron_archive_filename))
96
+ cache = os.path.abspath(os.path.join(self.options.dir, self.cache_filename))
97
+
98
+ if not os.path.exists(archive):
99
+ self.download_archive(archive)
100
+ else:
101
+ print("Archive is OK")
102
+
103
+ if not os.path.exists(cache):
104
+ self.cache_messages(archive, cache)
105
+ else:
106
+ print("Cache is OK")
107
+
108
+ def documents(self):
109
+ if not os.path.exists(self.cache_filename):
110
+ raise Exception("Message cache does not exist, use --setup")
111
+
112
+ f = open(self.cache_filename, "rb")
113
+ try:
114
+ while True:
115
+ self.filepos = f.tell()
116
+ d = load(f)
117
+ yield d
118
+ except EOFError:
119
+ pass
120
+ f.close()
121
+
122
+ def whoosh_schema(self):
123
+ ana = analysis.StemmingAnalyzer(maxsize=40, cachesize=None)
124
+ storebody = self.options.storebody
125
+ schema = fields.Schema(body=fields.TEXT(analyzer=ana, stored=storebody),
126
+ filepos=fields.STORED,
127
+ date=fields.ID(stored=True),
128
+ frm=fields.ID(stored=True),
129
+ to=fields.IDLIST(stored=True),
130
+ subject=fields.TEXT(stored=True),
131
+ cc=fields.IDLIST,
132
+ bcc=fields.IDLIST)
133
+ return schema
134
+
135
+ def xappy_indexer_connection(self, path):
136
+ conn = xappy.IndexerConnection(path)
137
+ conn.add_field_action('body', xappy.FieldActions.INDEX_FREETEXT, language='en')
138
+ if self.options.storebody:
139
+ conn.add_field_action('body', xappy.FieldActions.STORE_CONTENT)
140
+ conn.add_field_action('date', xappy.FieldActions.INDEX_EXACT)
141
+ conn.add_field_action('date', xappy.FieldActions.STORE_CONTENT)
142
+ conn.add_field_action('frm', xappy.FieldActions.INDEX_EXACT)
143
+ conn.add_field_action('frm', xappy.FieldActions.STORE_CONTENT)
144
+ conn.add_field_action('to', xappy.FieldActions.INDEX_EXACT)
145
+ conn.add_field_action('to', xappy.FieldActions.STORE_CONTENT)
146
+ conn.add_field_action('subject', xappy.FieldActions.INDEX_FREETEXT, language='en')
147
+ conn.add_field_action('subject', xappy.FieldActions.STORE_CONTENT)
148
+ conn.add_field_action('cc', xappy.FieldActions.INDEX_EXACT)
149
+ conn.add_field_action('bcc', xappy.FieldActions.INDEX_EXACT)
150
+ return conn
151
+
152
+ def zcatalog_setup(self, cat):
153
+ from zcatalog import indexes
154
+ for name in ("date", "frm"):
155
+ cat[name] = indexes.FieldIndex(field_name=name)
156
+ for name in ("to", "subject", "cc", "bcc", "body"):
157
+ cat[name] = indexes.TextIndex(field_name=name)
158
+
159
+ def process_document_whoosh(self, d):
160
+ d["filepos"] = self.filepos
161
+ if self.options.storebody:
162
+ mf = self.main_field
163
+ d["_stored_%s" % mf] = compress(d[mf], 9)
164
+
165
+ def process_result_whoosh(self, d):
166
+ mf = self.main_field
167
+ if mf in d:
168
+ d.fields()[mf] = decompress(d[mf])
169
+ else:
170
+ if not self.cachefile:
171
+ self.cachefile = open(self.cache_filename, "rb")
172
+ filepos = d["filepos"]
173
+ self.cachefile.seek(filepos)
174
+ dd = load(self.cachefile)
175
+ d.fields()[mf] = dd[mf]
176
+ return d
177
+
178
+ def process_document_xapian(self, d):
179
+ d[self.main_field] = " ".join([d.get(name, "") for name
180
+ in self.field_order])
181
+
182
+
183
+
184
+ if __name__=="__main__":
185
+ Bench().run(Enron)
whoosh/source/benchmark/marc21.py ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import with_statement, print_function
2
+ import fnmatch, logging, os.path, re
3
+
4
+ from whoosh import analysis, fields, index, qparser, query, scoring
5
+ from whoosh.compat import xrange
6
+ from whoosh.util import now
7
+
8
+
9
+ log = logging.getLogger(__name__)
10
+
11
+
12
+ # Functions for reading MARC format
13
+
14
+ LEADER = (' ' * 10) + '22' + (' ' * 8) + '4500'
15
+ LEADER_LEN = len(LEADER)
16
+ DIRECTORY_ENTRY_LEN = 12
17
+ SUBFIELD_INDICATOR = "\x1F"
18
+ END_OF_FIELD = "\x1E"
19
+ END_OF_RECORD = "\x1D"
20
+ isbn_regex = re.compile(r'[-0-9xX]+')
21
+
22
+
23
+ def read_file(dbfile, tags=None):
24
+ while True:
25
+ pos = dbfile.tell()
26
+ first5 = dbfile.read(5)
27
+ if not first5:
28
+ return
29
+ if len(first5) < 5:
30
+ raise Exception
31
+ length = int(first5)
32
+ chunk = dbfile.read(length - 5)
33
+ yield parse_record(first5 + chunk, tags), pos
34
+
35
+
36
+ def read_record(filename, pos, tags=None):
37
+ f = open(filename, "rb")
38
+ f.seek(pos)
39
+ first5 = f.read(5)
40
+ length = int(first5)
41
+ chunk = f.read(length - 5)
42
+ return parse_record(first5 + chunk, tags)
43
+
44
+
45
+ def parse_record(data, tags=None):
46
+ leader = data[:LEADER_LEN]
47
+ assert len(leader) == LEADER_LEN
48
+
49
+ dataoffset = int(data[12:17])
50
+ assert dataoffset > 0
51
+ assert dataoffset < len(data)
52
+
53
+ # dataoffset - 1 to avoid END-OF-FIELD byte
54
+ dirstart = LEADER_LEN
55
+ dirend = dataoffset - 1
56
+
57
+ # Number of fields in record
58
+ assert (dirend - dirstart) % DIRECTORY_ENTRY_LEN == 0
59
+ field_count = (dirend - dirstart) // DIRECTORY_ENTRY_LEN
60
+
61
+ result = {}
62
+ for i in xrange(field_count):
63
+ start = dirstart + i * DIRECTORY_ENTRY_LEN
64
+ end = start + DIRECTORY_ENTRY_LEN
65
+ tag = data[start:start + 3]
66
+ if tags and not tag in tags:
67
+ continue
68
+
69
+ entry = data[start:end]
70
+ elen = int(entry[3:7])
71
+ offset = dataoffset + int(entry[7:12])
72
+ edata = data[offset:offset + elen - 1]
73
+
74
+ if not (tag < "010" and tag.isdigit()):
75
+ edata = edata.split(SUBFIELD_INDICATOR)[1:]
76
+ if tag in result:
77
+ result[tag].extend(edata)
78
+ else:
79
+ result[tag] = edata
80
+ else:
81
+ result[tag] = edata
82
+ return result
83
+
84
+
85
+ def subfield(vs, code):
86
+ for v in vs:
87
+ if v.startswith(code):
88
+ return v[1:]
89
+ return None
90
+
91
+
92
+ def joinsubfields(vs):
93
+ return " ".join(v[1:] for v in vs if v and v[0] != "6")
94
+
95
+
96
+ def getfields(d, *tags):
97
+ return (d[tag] for tag in tags if tag in d)
98
+
99
+
100
+ def title(d):
101
+ title = None
102
+ if "245" in d:
103
+ svs = d["245"]
104
+ title = subfield(svs, "a")
105
+ if title:
106
+ t2 = subfield(svs, "b")
107
+ if t2:
108
+ title += t2
109
+ return title
110
+
111
+
112
+ def isbn(d):
113
+ if "020" in d:
114
+ num = subfield(d["020"], "a")
115
+ if num:
116
+ match = isbn_regex.search(num)
117
+ if match:
118
+ return match.group(0).replace('-', '')
119
+
120
+
121
+ def author(d):
122
+ if "100" in d:
123
+ return joinsubfields(d["100"])
124
+ elif "110" in d:
125
+ return joinsubfields(d["110"])
126
+ elif "111" in d:
127
+ return joinsubfields(d["111"])
128
+
129
+
130
+ def uniform_title(d):
131
+ if "130" in d:
132
+ return joinsubfields(d["130"])
133
+ elif "240" in d:
134
+ return joinsubfields(d["240"])
135
+
136
+
137
+ subjectfields = ("600 610 611 630 648 650 651 653 654 655 656 657 658 662 "
138
+ "690 691 696 697 698 699").split()
139
+
140
+
141
+ def subjects(d):
142
+ return " ".join(joinsubfields(vs) for vs in getfields(d, *subjectfields))
143
+
144
+
145
+ def physical(d):
146
+ return joinsubfields(d["300"])
147
+
148
+
149
+ def location(d):
150
+ return joinsubfields(d["852"])
151
+
152
+
153
+ def publisher(d):
154
+ if "260" in d:
155
+ return subfield(d["260"], "b")
156
+
157
+
158
+ def pubyear(d):
159
+ if "260" in d:
160
+ return subfield(d["260"], "c")
161
+
162
+
163
+ def uni(v):
164
+ return u"" if v is None else v.decode("utf-8", "replace")
165
+
166
+
167
+ # Indexing and searching
168
+
169
+ def make_index(basedir, ixdir, procs=4, limitmb=128, multisegment=True,
170
+ glob="*.mrc"):
171
+ if not os.path.exists(ixdir):
172
+ os.mkdir(ixdir)
173
+
174
+ # Multi-lingual stop words
175
+ stoplist = (analysis.STOP_WORDS
176
+ | set("de la der und le die et en al no von di du da "
177
+ "del zur ein".split()))
178
+ # Schema
179
+ ana = analysis.StemmingAnalyzer(stoplist=stoplist)
180
+ schema = fields.Schema(title=fields.TEXT(analyzer=ana),
181
+ author=fields.TEXT(phrase=False),
182
+ subject=fields.TEXT(analyzer=ana, phrase=False),
183
+ file=fields.STORED, pos=fields.STORED,
184
+ )
185
+
186
+ # MARC fields to extract
187
+ mfields = set(subjectfields) # Subjects
188
+ mfields.update("100 110 111".split()) # Author
189
+ mfields.add("245") # Title
190
+
191
+ print("Indexing with %d processor(s) and %d MB per processor"
192
+ % (procs, limitmb))
193
+ c = 0
194
+ t = now()
195
+ ix = index.create_in(ixdir, schema)
196
+ with ix.writer(procs=procs, limitmb=limitmb,
197
+ multisegment=multisegment) as w:
198
+ filenames = [filename for filename in os.listdir(basedir)
199
+ if fnmatch.fnmatch(filename, glob)]
200
+ for filename in filenames:
201
+ path = os.path.join(basedir, filename)
202
+ print("Indexing", path)
203
+ f = open(path, 'rb')
204
+ for x, pos in read_file(f, mfields):
205
+ w.add_document(title=uni(title(x)), author=uni(author(x)),
206
+ subject=uni(subjects(x)),
207
+ file=filename, pos=pos)
208
+ c += 1
209
+ f.close()
210
+ print("Committing...")
211
+ print("Indexed %d records in %0.02f minutes" % (c, (now() - t) / 60.0))
212
+
213
+
214
+ def print_record(no, basedir, filename, pos):
215
+ path = os.path.join(basedir, filename)
216
+ record = read_record(path, pos)
217
+ print("% 5d. %s" % (no + 1, title(record)))
218
+ print(" ", author(record))
219
+ print(" ", subjects(record))
220
+ isbn_num = isbn(record)
221
+ if isbn_num:
222
+ print(" ISBN:", isbn_num)
223
+ print()
224
+
225
+
226
+ def search(qstring, ixdir, basedir, limit=None, optimize=True, scores=True):
227
+ ix = index.open_dir(ixdir)
228
+ qp = qparser.QueryParser("title", ix.schema)
229
+ q = qp.parse(qstring)
230
+
231
+ with ix.searcher(weighting=scoring.PL2()) as s:
232
+ if scores:
233
+ r = s.search(q, limit=limit, optimize=optimize)
234
+ for hit in r:
235
+ print_record(hit.rank, basedir, hit["file"], hit["pos"])
236
+ print("Found %d records in %0.06f seconds" % (len(r), r.runtime))
237
+ else:
238
+ t = now()
239
+ for i, docnum in enumerate(s.docs_for_query(q)):
240
+ if not limit or i < limit:
241
+ fields = s.stored_fields(docnum)
242
+ print_record(i, basedir, fields["file"], fields["pos"])
243
+ print("Found %d records in %0.06f seconds" % (i, now() - t))
244
+
245
+
246
+ if __name__ == "__main__":
247
+ from optparse import OptionParser
248
+
249
+ p = OptionParser(usage="usage: %prog [options] query")
250
+ # Common options
251
+ p.add_option("-f", "--filedir", metavar="DIR", dest="basedir",
252
+ help="Directory containing the .mrc files to index",
253
+ default="data/HLOM")
254
+ p.add_option("-d", "--dir", metavar="DIR", dest="ixdir",
255
+ help="Directory containing the index", default="marc_index")
256
+
257
+ # Indexing options
258
+ p.add_option("-i", "--index", dest="index",
259
+ help="Index the records", action="store_true", default=False)
260
+ p.add_option("-p", "--procs", metavar="NPROCS", dest="procs",
261
+ help="Number of processors to use", default="1")
262
+ p.add_option("-m", "--mb", metavar="MB", dest="limitmb",
263
+ help="Limit the indexer to this many MB of memory per writer",
264
+ default="128")
265
+ p.add_option("-M", "--merge-segments", dest="multisegment",
266
+ help="If indexing with multiproc, merge the segments after"
267
+ " indexing", action="store_false", default=True)
268
+ p.add_option("-g", "--match", metavar="GLOB", dest="glob",
269
+ help="Only index file names matching the given pattern",
270
+ default="*.mrc")
271
+
272
+ # Search options
273
+ p.add_option("-l", "--limit", metavar="NHITS", dest="limit",
274
+ help="Maximum number of search results to print (0=no limit)",
275
+ default="10")
276
+ p.add_option("-O", "--no-optimize", dest="optimize",
277
+ help="Turn off searcher optimization (for debugging)",
278
+ action="store_false", default=True)
279
+ p.add_option("-s", "--scoring", dest="scores",
280
+ help="Score the results", action="store_true", default=False)
281
+
282
+ options, args = p.parse_args()
283
+
284
+ if options.index:
285
+ make_index(options.basedir, options.ixdir,
286
+ procs=int(options.procs),
287
+ limitmb=int(options.limitmb),
288
+ multisegment=options.multisegment,
289
+ glob=options.glob)
290
+
291
+ if args:
292
+ qstring = " ".join(args).decode("utf-8")
293
+ limit = int(options.limit)
294
+ if limit < 1:
295
+ limit = None
296
+ search(qstring, options.ixdir, options.basedir, limit=limit,
297
+ optimize=options.optimize, scores=options.scores)
whoosh/source/benchmark/reuters.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gzip, os.path
2
+
3
+ from whoosh import analysis, fields, index, qparser, query
4
+ from whoosh.support.bench import Bench, Spec
5
+ from whoosh.util import now
6
+
7
+
8
+ class Reuters(Spec):
9
+ name = "reuters"
10
+ filename = "reuters21578.txt.gz"
11
+ main_field = "text"
12
+ headline_text = "headline"
13
+
14
+ def whoosh_schema(self):
15
+ #ana = analysis.StemmingAnalyzer()
16
+ ana = analysis.StandardAnalyzer()
17
+ schema = fields.Schema(id=fields.ID(stored=True),
18
+ headline=fields.STORED,
19
+ text=fields.TEXT(analyzer=ana, stored=True))
20
+ return schema
21
+
22
+ def zcatalog_setup(self, cat):
23
+ from zcatalog import indexes #@UnresolvedImport
24
+ cat["id"] = indexes.FieldIndex(field_name="id")
25
+ cat["headline"] = indexes.TextIndex(field_name="headline")
26
+ cat["body"] = indexes.TextIndex(field_name="text")
27
+
28
+ def documents(self):
29
+ path = os.path.join(self.options.dir, self.filename)
30
+ f = gzip.GzipFile(path)
31
+
32
+ for line in f:
33
+ id, text = line.decode("latin1").split("\t")
34
+ yield {"id": id, "text": text, "headline": text[:70]}
35
+
36
+
37
+ if __name__ == "__main__":
38
+ Bench().run(Reuters)
whoosh/source/benchmark/reuters21578.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e27185a494675296d75a4332c91e380bf4d8c49e0b074fa761e8b76d2881063
3
+ size 181938
whoosh/source/docs/Makefile ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = sphinx-build
7
+ PAPER =
8
+ BUILDDIR = build
9
+
10
+ # Internal variables.
11
+ PAPEROPT_a4 = -D latex_paper_size=a4
12
+ PAPEROPT_letter = -D latex_paper_size=letter
13
+ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
14
+
15
+ .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
16
+
17
+ help:
18
+ @echo "Please use \`make <target>' where <target> is one of"
19
+ @echo " html to make standalone HTML files"
20
+ @echo " dirhtml to make HTML files named index.html in directories"
21
+ @echo " singlehtml to make a single large HTML file"
22
+ @echo " pickle to make pickle files"
23
+ @echo " json to make JSON files"
24
+ @echo " htmlhelp to make HTML files and a HTML help project"
25
+ @echo " qthelp to make HTML files and a qthelp project"
26
+ @echo " devhelp to make HTML files and a Devhelp project"
27
+ @echo " epub to make an epub"
28
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
29
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
30
+ @echo " text to make text files"
31
+ @echo " man to make manual pages"
32
+ @echo " changes to make an overview of all changed/added/deprecated items"
33
+ @echo " linkcheck to check all external links for integrity"
34
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
35
+
36
+ clean:
37
+ -rm -rf $(BUILDDIR)/*
38
+
39
+ html:
40
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
41
+ @echo
42
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
43
+
44
+ dirhtml:
45
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
46
+ @echo
47
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
48
+
49
+ singlehtml:
50
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
51
+ @echo
52
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
53
+
54
+ pickle:
55
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
56
+ @echo
57
+ @echo "Build finished; now you can process the pickle files."
58
+
59
+ json:
60
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
61
+ @echo
62
+ @echo "Build finished; now you can process the JSON files."
63
+
64
+ htmlhelp:
65
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
66
+ @echo
67
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
68
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
69
+
70
+ qthelp:
71
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
72
+ @echo
73
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
74
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
75
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Whoosh.qhcp"
76
+ @echo "To view the help file:"
77
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Whoosh.qhc"
78
+
79
+ devhelp:
80
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
81
+ @echo
82
+ @echo "Build finished."
83
+ @echo "To view the help file:"
84
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/Whoosh"
85
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Whoosh"
86
+ @echo "# devhelp"
87
+
88
+ epub:
89
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
90
+ @echo
91
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
92
+
93
+ latex:
94
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
95
+ @echo
96
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
97
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
98
+ "(use \`make latexpdf' here to do that automatically)."
99
+
100
+ latexpdf:
101
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
102
+ @echo "Running LaTeX files through pdflatex..."
103
+ make -C $(BUILDDIR)/latex all-pdf
104
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
105
+
106
+ text:
107
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
108
+ @echo
109
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
110
+
111
+ man:
112
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
113
+ @echo
114
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
115
+
116
+ changes:
117
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
118
+ @echo
119
+ @echo "The overview file is in $(BUILDDIR)/changes."
120
+
121
+ linkcheck:
122
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
123
+ @echo
124
+ @echo "Link check complete; look for any errors in the above output " \
125
+ "or in $(BUILDDIR)/linkcheck/output.txt."
126
+
127
+ doctest:
128
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
129
+ @echo "Testing of doctests in the sources finished, look at the " \
130
+ "results in $(BUILDDIR)/doctest/output.txt."
whoosh/source/docs/make.bat ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @ECHO OFF
2
+
3
+ REM Command file for Sphinx documentation
4
+
5
+ if "%SPHINXBUILD%" == "" (
6
+ set SPHINXBUILD=sphinx-build
7
+ )
8
+ set BUILDDIR=build
9
+ set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
10
+ if NOT "%PAPER%" == "" (
11
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
12
+ )
13
+
14
+ if "%1" == "" goto help
15
+
16
+ if "%1" == "help" (
17
+ :help
18
+ echo.Please use `make ^<target^>` where ^<target^> is one of
19
+ echo. html to make standalone HTML files
20
+ echo. dirhtml to make HTML files named index.html in directories
21
+ echo. singlehtml to make a single large HTML file
22
+ echo. pickle to make pickle files
23
+ echo. json to make JSON files
24
+ echo. htmlhelp to make HTML files and a HTML help project
25
+ echo. qthelp to make HTML files and a qthelp project
26
+ echo. devhelp to make HTML files and a Devhelp project
27
+ echo. epub to make an epub
28
+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
29
+ echo. text to make text files
30
+ echo. man to make manual pages
31
+ echo. changes to make an overview over all changed/added/deprecated items
32
+ echo. linkcheck to check all external links for integrity
33
+ echo. doctest to run all doctests embedded in the documentation if enabled
34
+ goto end
35
+ )
36
+
37
+ if "%1" == "clean" (
38
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
39
+ del /q /s %BUILDDIR%\*
40
+ goto end
41
+ )
42
+
43
+ if "%1" == "html" (
44
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
45
+ if errorlevel 1 exit /b 1
46
+ echo.
47
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
48
+ goto end
49
+ )
50
+
51
+ if "%1" == "dirhtml" (
52
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
53
+ if errorlevel 1 exit /b 1
54
+ echo.
55
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
56
+ goto end
57
+ )
58
+
59
+ if "%1" == "singlehtml" (
60
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
61
+ if errorlevel 1 exit /b 1
62
+ echo.
63
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
64
+ goto end
65
+ )
66
+
67
+ if "%1" == "pickle" (
68
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
69
+ if errorlevel 1 exit /b 1
70
+ echo.
71
+ echo.Build finished; now you can process the pickle files.
72
+ goto end
73
+ )
74
+
75
+ if "%1" == "json" (
76
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
77
+ if errorlevel 1 exit /b 1
78
+ echo.
79
+ echo.Build finished; now you can process the JSON files.
80
+ goto end
81
+ )
82
+
83
+ if "%1" == "htmlhelp" (
84
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
85
+ if errorlevel 1 exit /b 1
86
+ echo.
87
+ echo.Build finished; now you can run HTML Help Workshop with the ^
88
+ .hhp project file in %BUILDDIR%/htmlhelp.
89
+ goto end
90
+ )
91
+
92
+ if "%1" == "qthelp" (
93
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
94
+ if errorlevel 1 exit /b 1
95
+ echo.
96
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
97
+ .qhcp project file in %BUILDDIR%/qthelp, like this:
98
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Whoosh.qhcp
99
+ echo.To view the help file:
100
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Whoosh.ghc
101
+ goto end
102
+ )
103
+
104
+ if "%1" == "devhelp" (
105
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
106
+ if errorlevel 1 exit /b 1
107
+ echo.
108
+ echo.Build finished.
109
+ goto end
110
+ )
111
+
112
+ if "%1" == "epub" (
113
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
114
+ if errorlevel 1 exit /b 1
115
+ echo.
116
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
117
+ goto end
118
+ )
119
+
120
+ if "%1" == "latex" (
121
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
122
+ if errorlevel 1 exit /b 1
123
+ echo.
124
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
125
+ goto end
126
+ )
127
+
128
+ if "%1" == "text" (
129
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
130
+ if errorlevel 1 exit /b 1
131
+ echo.
132
+ echo.Build finished. The text files are in %BUILDDIR%/text.
133
+ goto end
134
+ )
135
+
136
+ if "%1" == "man" (
137
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
138
+ if errorlevel 1 exit /b 1
139
+ echo.
140
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
141
+ goto end
142
+ )
143
+
144
+ if "%1" == "changes" (
145
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
146
+ if errorlevel 1 exit /b 1
147
+ echo.
148
+ echo.The overview file is in %BUILDDIR%/changes.
149
+ goto end
150
+ )
151
+
152
+ if "%1" == "linkcheck" (
153
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
154
+ if errorlevel 1 exit /b 1
155
+ echo.
156
+ echo.Link check complete; look for any errors in the above output ^
157
+ or in %BUILDDIR%/linkcheck/output.txt.
158
+ goto end
159
+ )
160
+
161
+ if "%1" == "doctest" (
162
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
163
+ if errorlevel 1 exit /b 1
164
+ echo.
165
+ echo.Testing of doctests in the sources finished, look at the ^
166
+ results in %BUILDDIR%/doctest/output.txt.
167
+ goto end
168
+ )
169
+
170
+ :end
whoosh/source/docs/source/analysis.rst ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ===============
2
+ About analyzers
3
+ ===============
4
+
5
+ Overview
6
+ ========
7
+
8
+ An analyzer is a function or callable class (a class with a ``__call__`` method)
9
+ that takes a unicode string and returns a generator of tokens. Usually a "token"
10
+ is a word, for example the string "Mary had a little lamb" might yield the
11
+ tokens "Mary", "had", "a", "little", and "lamb". However, tokens do not
12
+ necessarily correspond to words. For example, you might tokenize Chinese text
13
+ into individual characters or bi-grams. Tokens are the units of indexing, that
14
+ is, they are what you are able to look up in the index.
15
+
16
+ An analyzer is basically just a wrapper for a tokenizer and zero or more
17
+ filters. The analyzer's ``__call__`` method will pass its parameters to a
18
+ tokenizer, and the tokenizer will usually be wrapped in a few filters.
19
+
20
+ A tokenizer is a callable that takes a unicode string and yields a series of
21
+ ``analysis.Token`` objects.
22
+
23
+ For example, the provided :class:`whoosh.analysis.RegexTokenizer` class
24
+ implements a customizable, regular-expression-based tokenizer that extracts
25
+ words and ignores whitespace and punctuation.
26
+
27
+ ::
28
+
29
+ >>> from whoosh.analysis import RegexTokenizer
30
+ >>> tokenizer = RegexTokenizer()
31
+ >>> for token in tokenizer(u"Hello there my friend!"):
32
+ ... print repr(token.text)
33
+ u'Hello'
34
+ u'there'
35
+ u'my'
36
+ u'friend'
37
+
38
+ A filter is a callable that takes a generator of Tokens (either a tokenizer or
39
+ another filter) and in turn yields a series of Tokens.
40
+
41
+ For example, the provided :meth:`whoosh.analysis.LowercaseFilter` filters tokens
42
+ by converting their text to lowercase. The implementation is very simple::
43
+
44
+ def LowercaseFilter(tokens):
45
+ """Uses lower() to lowercase token text. For example, tokens
46
+ "This","is","a","TEST" become "this","is","a","test".
47
+ """
48
+
49
+ for t in tokens:
50
+ t.text = t.text.lower()
51
+ yield t
52
+
53
+ You can wrap the filter around a tokenizer to see it in operation::
54
+
55
+ >>> from whoosh.analysis import LowercaseFilter
56
+ >>> for token in LowercaseFilter(tokenizer(u"These ARE the things I want!")):
57
+ ... print repr(token.text)
58
+ u'these'
59
+ u'are'
60
+ u'the'
61
+ u'things'
62
+ u'i'
63
+ u'want'
64
+
65
+ An analyzer is just a means of combining a tokenizer and some filters into a
66
+ single package.
67
+
68
+ You can implement an analyzer as a custom class or function, or compose
69
+ tokenizers and filters together using the ``|`` character::
70
+
71
+ my_analyzer = RegexTokenizer() | LowercaseFilter() | StopFilter()
72
+
73
+ The first item must be a tokenizer and the rest must be filters (you can't put a
74
+ filter first or a tokenizer after the first item). Note that this only works if at
75
+ least the tokenizer is a subclass of ``whoosh.analysis.Composable``, as all the
76
+ tokenizers and filters that ship with Whoosh are.
77
+
78
+ See the :mod:`whoosh.analysis` module for information on the available analyzers,
79
+ tokenizers, and filters shipped with Whoosh.
80
+
81
+
82
+ Using analyzers
83
+ ===============
84
+
85
+ When you create a field in a schema, you can specify your analyzer as a keyword
86
+ argument to the field object::
87
+
88
+ schema = Schema(content=TEXT(analyzer=StemmingAnalyzer()))
89
+
90
+
91
+ Advanced Analysis
92
+ =================
93
+
94
+ Token objects
95
+ -------------
96
+
97
+ The ``Token`` class has no methods. It is merely a place to record certain
98
+ attributes. A ``Token`` object actually has two kinds of attributes: *settings*
99
+ that record what kind of information the ``Token`` object does or should contain,
100
+ and *information* about the current token.
101
+
102
+
103
+ Token setting attributes
104
+ ------------------------
105
+
106
+ A ``Token`` object should always have the following attributes. A tokenizer or
107
+ filter can check these attributes to see what kind of information is available
108
+ and/or what kind of information they should be setting on the ``Token`` object.
109
+
110
+ These attributes are set by the tokenizer when it creates the Token(s), based on
111
+ the parameters passed to it from the Analyzer.
112
+
113
+ Filters **should not** change the values of these attributes.
114
+
115
+ ====== ================ =================================================== =========
116
+ Type Attribute name Description Default
117
+ ====== ================ =================================================== =========
118
+ str mode The mode in which the analyzer is being called, ''
119
+ e.g. 'index' during indexing or 'query' during
120
+ query parsing
121
+ bool positions Whether term positions are recorded in the token False
122
+ bool chars Whether term start and end character indices are False
123
+ recorded in the token
124
+ bool boosts Whether per-term boosts are recorded in the token False
125
+ bool removestops Whether stop-words should be removed from the True
126
+ token stream
127
+ ====== ================ =================================================== =========
128
+
129
+
130
+ Token information attributes
131
+ ----------------------------
132
+
133
+ A ``Token`` object may have any of the following attributes. The ``text`` attribute
134
+ should always be present. The original attribute may be set by a tokenizer. All
135
+ other attributes should only be accessed or set based on the values of the
136
+ "settings" attributes above.
137
+
138
+ ======== ========== =================================================================
139
+ Type Name Description
140
+ ======== ========== =================================================================
141
+ unicode text The text of the token (this should always be present)
142
+ unicode original The original (pre-filtered) text of the token. The tokenizer may
143
+ record this, and filters are expected not to modify it.
144
+ int pos The position of the token in the stream, starting at 0
145
+ (only set if positions is True)
146
+ int startchar The character index of the start of the token in the original
147
+ string (only set if chars is True)
148
+ int endchar The character index of the end of the token in the original
149
+ string (only set if chars is True)
150
+ float boost The boost for this token (only set if boosts is True)
151
+ bool stopped Whether this token is a "stop" word
152
+ (only set if removestops is False)
153
+ ======== ========== =================================================================
154
+
155
+ So why are most of the information attributes optional? Different field formats
156
+ require different levels of information about each token. For example, the
157
+ ``Frequency`` format only needs the token text. The ``Positions`` format records term
158
+ positions, so it needs them on the ``Token``. The ``Characters`` format records term
159
+ positions and the start and end character indices of each term, so it needs them
160
+ on the token, and so on.
161
+
162
+ The ``Format`` object that represents the format of each field calls the analyzer
163
+ for the field, and passes it parameters corresponding to the types of
164
+ information it needs, e.g.::
165
+
166
+ analyzer(unicode_string, positions=True)
167
+
168
+ The analyzer can then pass that information to a tokenizer so the tokenizer
169
+ initializes the required attributes on the ``Token`` object(s) it produces.
170
+
171
+
172
+ Performing different analysis for indexing and query parsing
173
+ ------------------------------------------------------------
174
+
175
+ Whoosh sets the ``mode`` setting attribute to indicate whether the analyzer is
176
+ being called by the indexer (``mode='index'``) or the query parser
177
+ (``mode='query'``). This is useful if there's a transformation that you only
178
+ want to apply at indexing or query parsing::
179
+
180
+ class MyFilter(Filter):
181
+ def __call__(self, tokens):
182
+ for t in tokens:
183
+ if t.mode == 'query':
184
+ ...
185
+ else:
186
+ ...
187
+
188
+ The :class:`whoosh.analysis.MultiFilter` filter class lets you specify different
189
+ filters to use based on the mode setting::
190
+
191
+ intraword = MultiFilter(index=IntraWordFilter(mergewords=True, mergenums=True),
192
+ query=IntraWordFilter(mergewords=False, mergenums=False))
193
+
194
+
195
+ Stop words
196
+ ----------
197
+
198
+ "Stop" words are words that are so common it's often counter-productive to index
199
+ them, such as "and", "or", "if", etc. The provided ``analysis.StopFilter`` lets you
200
+ filter out stop words, and includes a default list of common stop words.
201
+
202
+ ::
203
+
204
+ >>> from whoosh.analysis import StopFilter
205
+ >>> stopper = StopFilter()
206
+ >>> for token in stopper(LowercaseFilter(tokenizer(u"These ARE the things I want!"))):
207
+ ... print repr(token.text)
208
+ u'these'
209
+ u'things'
210
+ u'want'
211
+
212
+ However, this seemingly simple filter idea raises a couple of minor but slightly
213
+ thorny issues: renumbering term positions and keeping or removing stopped words.
214
+
215
+
216
+ Renumbering term positions
217
+ --------------------------
218
+
219
+ Remember that analyzers are sometimes asked to record the position of each token
220
+ in the token stream:
221
+
222
+ ============= ========== ========== ========== ==========
223
+ Token.text u'Mary' u'had' u'a' u'lamb'
224
+ Token.pos 0 1 2 3
225
+ ============= ========== ========== ========== ==========
226
+
227
+ So what happens to the ``pos`` attribute of the tokens if ``StopFilter`` removes
228
+ the words ``had`` and ``a`` from the stream? Should it renumber the positions to
229
+ pretend the "stopped" words never existed? I.e.:
230
+
231
+ ============= ========== ==========
232
+ Token.text u'Mary' u'lamb'
233
+ Token.pos 0 1
234
+ ============= ========== ==========
235
+
236
+ or should it preserve the original positions of the words? I.e:
237
+
238
+ ============= ========== ==========
239
+ Token.text u'Mary' u'lamb'
240
+ Token.pos 0 3
241
+ ============= ========== ==========
242
+
243
+ It turns out that different situations call for different solutions, so the
244
+ provided ``StopFilter`` class supports both of the above behaviors. Renumbering
245
+ is the default, since that is usually the most useful and is necessary to
246
+ support phrase searching. However, you can set a parameter in StopFilter's
247
+ constructor to tell it not to renumber positions::
248
+
249
+ stopper = StopFilter(renumber=False)
250
+
251
+
252
+ Removing or leaving stop words
253
+ ------------------------------
254
+
255
+ The point of using ``StopFilter`` is to remove stop words, right? Well, there
256
+ are actually some situations where you might want to mark tokens as "stopped"
257
+ but not remove them from the token stream.
258
+
259
+ For example, if you were writing your own query parser, you could run the user's
260
+ query through a field's analyzer to break it into tokens. In that case, you
261
+ might want to know which words were "stopped" so you can provide helpful
262
+ feedback to the end user (e.g. "The following words are too common to search
263
+ for:").
264
+
265
+ In other cases, you might want to leave stopped words in the stream for certain
266
+ filtering steps (for example, you might have a step that looks at previous
267
+ tokens, and want the stopped tokens to be part of the process), but then remove
268
+ them later.
269
+
270
+ The ``analysis`` module provides a couple of tools for keeping and removing
271
+ stop-words in the stream.
272
+
273
+ The ``removestops`` parameter passed to the analyzer's ``__call__`` method (and
274
+ copied to the ``Token`` object as an attribute) specifies whether stop words should
275
+ be removed from the stream or left in.
276
+
277
+ ::
278
+
279
+ >>> from whoosh.analysis import StandardAnalyzer
280
+ >>> analyzer = StandardAnalyzer()
281
+ >>> [(t.text, t.stopped) for t in analyzer(u"This is a test")]
282
+ [(u'test', False)]
283
+ >>> [(t.text, t.stopped) for t in analyzer(u"This is a test", removestops=False)]
284
+ [(u'this', True), (u'is', True), (u'a', True), (u'test', False)]
285
+
286
+ The ``analysis.unstopped()`` filter function takes a token generator and yields
287
+ only the tokens whose ``stopped`` attribute is ``False``.
288
+
289
+ .. note::
290
+ Even if you leave stopped words in the stream in an analyzer you use for
291
+ indexing, the indexer will ignore any tokens where the ``stopped``
292
+ attribute is ``True``.
293
+
294
+
295
+ Implementation notes
296
+ --------------------
297
+
298
+ Because object creation is slow in Python, the stock tokenizers do not create a
299
+ new ``analysis.Token`` object for each token. Instead, they create one ``Token`` object
300
+ and yield it over and over. This is a nice performance shortcut but can lead to
301
+ strange behavior if your code tries to remember tokens between loops of the
302
+ generator.
303
+
304
+ Because the analyzer only has one ``Token`` object, of which it keeps changing the
305
+ attributes, if you keep a copy of the Token you get from a loop of the
306
+ generator, it will be changed from under you. For example::
307
+
308
+ >>> list(tokenizer(u"Hello there my friend"))
309
+ [Token(u"friend"), Token(u"friend"), Token(u"friend"), Token(u"friend")]
310
+
311
+ Instead, do this::
312
+
313
+ >>> [t.text for t in tokenizer(u"Hello there my friend")]
314
+
315
+ That is, save the attributes, not the token object itself.
316
+
317
+ If you implement your own tokenizer, filter, or analyzer as a class, you should
318
+ implement an ``__eq__`` method. This is important to allow comparison of ``Schema``
319
+ objects.
320
+
321
+ The mixing of persistent "setting" and transient "information" attributes on the
322
+ ``Token`` object is not especially elegant. If I ever have a better idea I might
323
+ change it. ;) Nothing requires that an Analyzer be implemented by calling a
324
+ tokenizer and filters. Tokenizers and filters are simply a convenient way to
325
+ structure the code. You're free to write an analyzer any way you want, as long
326
+ as it implements ``__call__``.
327
+
328
+
329
+
whoosh/source/docs/source/api/analysis.rst ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ===================
2
+ ``analysis`` module
3
+ ===================
4
+
5
+ .. automodule:: whoosh.analysis
6
+
7
+ Analyzers
8
+ =========
9
+
10
+ .. autofunction:: IDAnalyzer
11
+ .. autofunction:: KeywordAnalyzer
12
+ .. autofunction:: RegexAnalyzer
13
+ .. autofunction:: SimpleAnalyzer
14
+ .. autofunction:: StandardAnalyzer
15
+ .. autofunction:: StemmingAnalyzer
16
+ .. autofunction:: FancyAnalyzer
17
+ .. autofunction:: NgramAnalyzer
18
+ .. autofunction:: NgramWordAnalyzer
19
+ .. autofunction:: LanguageAnalyzer
20
+
21
+
22
+ Tokenizers
23
+ ==========
24
+
25
+ .. autoclass:: IDTokenizer
26
+ .. autoclass:: RegexTokenizer
27
+ .. autoclass:: CharsetTokenizer
28
+ .. autofunction:: SpaceSeparatedTokenizer
29
+ .. autofunction:: CommaSeparatedTokenizer
30
+ .. autoclass:: NgramTokenizer
31
+ .. autoclass:: PathTokenizer
32
+
33
+
34
+ Filters
35
+ =======
36
+
37
+ .. autoclass:: PassFilter
38
+ .. autoclass:: LoggingFilter
39
+ .. autoclass:: MultiFilter
40
+ .. autoclass:: TeeFilter
41
+ .. autoclass:: ReverseTextFilter
42
+ .. autoclass:: LowercaseFilter
43
+ .. autoclass:: StripFilter
44
+ .. autoclass:: StopFilter
45
+ .. autoclass:: StemFilter
46
+ .. autoclass:: CharsetFilter
47
+ .. autoclass:: NgramFilter
48
+ .. autoclass:: IntraWordFilter
49
+ .. autoclass:: CompoundWordFilter
50
+ .. autoclass:: BiWordFilter
51
+ .. autoclass:: ShingleFilter
52
+ .. autoclass:: DelimitedAttributeFilter
53
+ .. autoclass:: DoubleMetaphoneFilter
54
+ .. autoclass:: SubstitutionFilter
55
+
56
+
57
+ Token classes and functions
58
+ ===========================
59
+
60
+ .. autoclass:: Token
61
+ .. autofunction:: unstopped
62
+
whoosh/source/docs/source/api/api.rst ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ ==========
2
+ Whoosh API
3
+ ==========
4
+
5
+ .. toctree::
6
+ :glob:
7
+ :maxdepth: 1
8
+
9
+ **
whoosh/source/docs/source/api/codec/base.rst ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ =====================
2
+ ``codec.base`` module
3
+ =====================
4
+
5
+ .. automodule:: whoosh.codec.base
6
+
7
+
8
+ Classes
9
+ =======
10
+
11
+ .. autoclass:: Codec
12
+ :members:
13
+
14
+ .. autoclass:: PerDocumentWriter
15
+ :members:
16
+
17
+ .. autoclass:: FieldWriter
18
+ :members:
19
+
20
+ .. autoclass:: PostingsWriter
21
+ :members:
22
+
23
+ .. autoclass:: TermsReader
24
+ :members:
25
+
26
+ .. autoclass:: PerDocumentReader
27
+ :members:
28
+
29
+ .. autoclass:: Segment
30
+ :members:
31
+
32
+
whoosh/source/docs/source/api/collectors.rst ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ =====================
2
+ ``collectors`` module
3
+ =====================
4
+
5
+ .. automodule:: whoosh.collectors
6
+
7
+
8
+ Base classes
9
+ ============
10
+
11
+ .. autoclass:: Collector
12
+ :members:
13
+
14
+ .. autoclass:: ScoredCollector
15
+ :members:
16
+
17
+ .. autoclass:: WrappingCollector
18
+ :members:
19
+
20
+
21
+ Basic collectors
22
+ ================
23
+
24
+ .. autoclass:: TopCollector
25
+
26
+ .. autoclass:: UnlimitedCollector
27
+
28
+ .. autoclass:: SortingCollector
29
+
30
+
31
+ Wrappers
32
+ ========
33
+
34
+ .. autoclass:: FilterCollector
35
+
36
+ .. autoclass:: FacetCollector
37
+
38
+ .. autoclass:: CollapseCollector
39
+
40
+ .. autoclass:: TimeLimitCollector
41
+
42
+ .. autoclass:: TermsCollector
43
+
44
+
45
+
46
+
47
+
whoosh/source/docs/source/api/columns.rst ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ =====================
2
+ ``columns`` module
3
+ =====================
4
+
5
+ .. automodule:: whoosh.columns
6
+
7
+
8
+ Base classes
9
+ ============
10
+
11
+ .. autoclass:: Column
12
+ :members:
13
+
14
+ .. autoclass:: ColumnWriter
15
+ :members:
16
+
17
+ .. autoclass:: ColumnReader
18
+ :members:
19
+
20
+
21
+ Basic columns
22
+ =============
23
+
24
+ .. autoclass:: VarBytesColumn
25
+
26
+ .. autoclass:: FixedBytesColumn
27
+
28
+ .. autoclass:: RefBytesColumn
29
+
30
+ .. autoclass:: NumericColumn
31
+
32
+
33
+ Technical columns
34
+ =================
35
+
36
+ .. autoclass:: BitColumn
37
+
38
+ .. autoclass:: CompressedBytesColumn
39
+
40
+ .. autoclass:: StructColumn
41
+
42
+ .. autoclass:: PickleColumn
43
+
44
+
45
+ Experimental columns
46
+ ====================
47
+
48
+ .. autoclass:: ClampedNumericColumn
49
+
whoosh/source/docs/source/api/fields.rst ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ =================
2
+ ``fields`` module
3
+ =================
4
+
5
+ .. automodule:: whoosh.fields
6
+
7
+ Schema class
8
+ ============
9
+
10
+ .. autoclass:: Schema
11
+ :members:
12
+
13
+ .. autoclass:: SchemaClass
14
+
15
+ FieldType base class
16
+ ====================
17
+
18
+ .. autoclass:: FieldType
19
+ :members:
20
+
21
+
22
+ Pre-made field types
23
+ ====================
24
+
25
+ .. autoclass:: ID
26
+ .. autoclass:: IDLIST
27
+ .. autoclass:: STORED
28
+ .. autoclass:: KEYWORD
29
+ .. autoclass:: TEXT
30
+ .. autoclass:: NUMERIC
31
+ .. autoclass:: DATETIME
32
+ .. autoclass:: BOOLEAN
33
+ .. autoclass:: NGRAM
34
+ .. autoclass:: NGRAMWORDS
35
+
36
+
37
+ Exceptions
38
+ ==========
39
+
40
+ .. autoexception:: FieldConfigurationError
41
+ .. autoexception:: UnknownFieldError
whoosh/source/docs/source/api/filedb/filestore.rst ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ===========================
2
+ ``filedb.filestore`` module
3
+ ===========================
4
+
5
+ .. automodule:: whoosh.filedb.filestore
6
+
7
+ Base class
8
+ ==========
9
+
10
+ .. autoclass:: Storage
11
+ :members:
12
+
13
+
14
+ Implementation classes
15
+ ======================
16
+
17
+ .. autoclass:: FileStorage
18
+ .. autoclass:: RamStorage
19
+
20
+
21
+ Helper functions
22
+ ================
23
+
24
+ .. autofunction:: copy_storage
25
+ .. autofunction:: copy_to_ram
26
+
27
+
28
+ Exceptions
29
+ ==========
30
+
31
+ .. autoexception:: ReadOnlyError
whoosh/source/docs/source/api/filedb/filetables.rst ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ============================
2
+ ``filedb.filetables`` module
3
+ ============================
4
+
5
+ .. automodule:: whoosh.filedb.filetables
6
+
7
+
8
+ Hash file
9
+ =========
10
+
11
+ .. autoclass:: HashWriter
12
+ :members:
13
+
14
+ .. autoclass:: HashReader
15
+ :members:
16
+
17
+
18
+ Ordered Hash file
19
+ =================
20
+
21
+ .. autoclass:: OrderedHashWriter
22
+ .. autoclass:: OrderedHashReader
whoosh/source/docs/source/api/filedb/structfile.rst ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ============================
2
+ ``filedb.structfile`` module
3
+ ============================
4
+
5
+ .. automodule:: whoosh.filedb.structfile
6
+
7
+ Classes
8
+ =======
9
+
10
+ .. autoclass:: StructFile
11
+ :members:
12
+
13
+ .. autoclass:: BufferFile
14
+ .. autoclass:: ChecksumFile
whoosh/source/docs/source/api/formats.rst ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ==================
2
+ ``formats`` module
3
+ ==================
4
+
5
+ .. automodule:: whoosh.formats
6
+
7
+ Base class
8
+ ==========
9
+
10
+ .. autoclass:: Format
11
+ :members:
12
+
13
+
14
+ Formats
15
+ =======
16
+
17
+ .. autoclass:: Existence
18
+ .. autoclass:: Frequency
19
+ .. autoclass:: Positions
20
+ .. autoclass:: Characters
21
+ .. autoclass:: PositionBoosts
22
+ .. autoclass:: CharacterBoosts
23
+
24
+
whoosh/source/docs/source/api/highlight.rst ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ====================
2
+ ``highlight`` module
3
+ ====================
4
+
5
+ .. automodule:: whoosh.highlight
6
+
7
+ See :doc:`how to highlight terms in search results </highlight>`.
8
+
9
+
10
+ Manual highlighting
11
+ ===================
12
+
13
+ .. autoclass:: Highlighter
14
+ :members:
15
+
16
+ .. autofunction:: highlight
17
+
18
+
19
+ Fragmenters
20
+ ===========
21
+
22
+ .. autoclass:: Fragmenter
23
+ :members:
24
+
25
+ .. autoclass:: WholeFragmenter
26
+ .. autoclass:: SentenceFragmenter
27
+ .. autoclass:: ContextFragmenter
28
+ .. autoclass:: PinpointFragmenter
29
+
30
+
31
+ Scorers
32
+ =======
33
+
34
+ .. autoclass:: FragmentScorer
35
+ .. autoclass:: BasicFragmentScorer
36
+
37
+
38
+ Formatters
39
+ ==========
40
+
41
+ .. autoclass:: UppercaseFormatter
42
+ .. autoclass:: HtmlFormatter
43
+ .. autoclass:: GenshiFormatter
44
+
45
+
46
+ Utility classes
47
+ ===============
48
+
49
+ .. autoclass:: Fragment
50
+ :members:
whoosh/source/docs/source/api/idsets.rst ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ============================
2
+ ``support.bitvector`` module
3
+ ============================
4
+
5
+ .. automodule:: whoosh.idsets
6
+
7
+
8
+ Base classes
9
+ ============
10
+
11
+ .. autoclass:: DocIdSet
12
+ :members:
13
+
14
+ .. autoclass:: BaseBitSet
15
+
16
+
17
+ Implementation classes
18
+ ======================
19
+
20
+ .. autoclass:: BitSet
21
+ .. autoclass:: OnDiskBitSet
22
+ .. autoclass:: SortedIntSet
23
+ .. autoclass:: MultiIdSet
whoosh/source/docs/source/api/index.rst ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ================
2
+ ``index`` module
3
+ ================
4
+
5
+ .. automodule:: whoosh.index
6
+
7
+
8
+ Functions
9
+ =========
10
+
11
+ .. autofunction:: create_in
12
+ .. autofunction:: open_dir
13
+ .. autofunction:: exists_in
14
+ .. autofunction:: exists
15
+ .. autofunction:: version_in
16
+ .. autofunction:: version
17
+
18
+
19
+ Base class
20
+ ==========
21
+
22
+ .. autoclass:: Index
23
+ :members:
24
+
25
+
26
+ Implementation
27
+ ==============
28
+
29
+ .. autoclass:: FileIndex
30
+
31
+
32
+ Exceptions
33
+ ==========
34
+
35
+ .. autoexception:: LockError
36
+ .. autoexception:: IndexError
37
+ .. autoexception:: IndexVersionError
38
+ .. autoexception:: OutOfDateError
39
+ .. autoexception:: EmptyIndexError
whoosh/source/docs/source/api/lang/morph_en.rst ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ========================
2
+ ``lang.morph_en`` module
3
+ ========================
4
+
5
+ .. automodule:: whoosh.lang.morph_en
6
+
7
+ .. autofunction:: variations
whoosh/source/docs/source/api/lang/porter.rst ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ======================
2
+ ``lang.porter`` module
3
+ ======================
4
+
5
+ .. automodule:: whoosh.lang.porter
6
+
7
+ .. autofunction:: stem
whoosh/source/docs/source/api/lang/wordnet.rst ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ========================
2
+ ``lang.wordnet`` module
3
+ ========================
4
+
5
+ .. automodule:: whoosh.lang.wordnet
6
+
7
+ Thesaurus
8
+ =========
9
+
10
+ .. autoclass:: Thesaurus
11
+ :members:
12
+
13
+
14
+ Low-level functions
15
+ ===================
16
+
17
+ .. autofunction:: parse_file
18
+ .. autofunction:: synonyms
19
+ .. autofunction:: make_index
20
+
whoosh/source/docs/source/api/matching.rst ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ===================
2
+ ``matching`` module
3
+ ===================
4
+
5
+ .. automodule:: whoosh.matching
6
+
7
+ Matchers
8
+ ========
9
+
10
+ .. autoclass:: Matcher
11
+ :members:
12
+
13
+ .. autoclass:: NullMatcher
14
+ .. autoclass:: ListMatcher
15
+ .. autoclass:: WrappingMatcher
16
+ .. autoclass:: MultiMatcher
17
+ .. autoclass:: FilterMatcher
18
+ .. autoclass:: BiMatcher
19
+ .. autoclass:: AdditiveBiMatcher
20
+ .. autoclass:: UnionMatcher
21
+ .. autoclass:: DisjunctionMaxMatcher
22
+ .. autoclass:: IntersectionMatcher
23
+ .. autoclass:: AndNotMatcher
24
+ .. autoclass:: InverseMatcher
25
+ .. autoclass:: RequireMatcher
26
+ .. autoclass:: AndMaybeMatcher
27
+ .. autoclass:: ConstantScoreMatcher
28
+
29
+
30
+ Exceptions
31
+ ==========
32
+
33
+ .. autoexception:: ReadTooFar
34
+ .. autoexception:: NoQualityAvailable
whoosh/source/docs/source/api/qparser.rst ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ==================
2
+ ``qparser`` module
3
+ ==================
4
+
5
+ .. automodule:: whoosh.qparser
6
+
7
+ Parser object
8
+ =============
9
+
10
+ .. autoclass:: QueryParser
11
+ :members:
12
+
13
+ Pre-made configurations
14
+ -----------------------
15
+
16
+ The following functions return pre-configured QueryParser objects.
17
+
18
+ .. autofunction:: MultifieldParser
19
+
20
+ .. autofunction:: SimpleParser
21
+
22
+ .. autofunction:: DisMaxParser
23
+
24
+
25
+ Plug-ins
26
+ ========
27
+
28
+ .. autoclass:: Plugin
29
+ :members:
30
+
31
+ .. autoclass:: SingleQuotePlugin
32
+ .. autoclass:: PrefixPlugin
33
+ .. autoclass:: WildcardPlugin
34
+ .. autoclass:: RegexPlugin
35
+ .. autoclass:: BoostPlugin
36
+ .. autoclass:: GroupPlugin
37
+ .. autoclass:: EveryPlugin
38
+ .. autoclass:: FieldsPlugin
39
+ .. autoclass:: PhrasePlugin
40
+ .. autoclass:: RangePlugin
41
+ .. autoclass:: OperatorsPlugin
42
+ .. autoclass:: PlusMinusPlugin
43
+ .. autoclass:: GtLtPlugin
44
+ .. autoclass:: MultifieldPlugin
45
+ .. autoclass:: FieldAliasPlugin
46
+ .. autoclass:: CopyFieldPlugin
47
+
48
+
49
+ Syntax node objects
50
+ ===================
51
+
52
+ Base nodes
53
+ ----------
54
+
55
+ .. autoclass:: SyntaxNode
56
+ :members:
57
+
58
+
59
+ Nodes
60
+ -----
61
+
62
+ .. autoclass:: FieldnameNode
63
+ .. autoclass:: TextNode
64
+ .. autoclass:: WordNode
65
+ .. autoclass:: RangeNode
66
+ .. autoclass:: MarkerNode
67
+
68
+
69
+ Group nodes
70
+ -----------
71
+
72
+ .. autoclass:: GroupNode
73
+ .. autoclass:: BinaryGroup
74
+ .. autoclass:: ErrorNode
75
+ .. autoclass:: AndGroup
76
+ .. autoclass:: OrGroup
77
+ .. autoclass:: AndNotGroup
78
+ .. autoclass:: AndMaybeGroup
79
+ .. autoclass:: DisMaxGroup
80
+ .. autoclass:: RequireGroup
81
+ .. autoclass:: NotGroup
82
+
83
+
84
+ Operators
85
+ ---------
86
+
87
+ .. autoclass:: Operator
88
+ .. autoclass:: PrefixOperator
89
+ .. autoclass:: PostfixOperator
90
+ .. autoclass:: InfixOperator
91
+
92
+
93
+
94
+
95
+
96
+
97
+