jottermem 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. jottermem-0.1.0/.github/workflows/ci.yml +25 -0
  2. jottermem-0.1.0/.github/workflows/publish.yml +33 -0
  3. jottermem-0.1.0/.gitignore +225 -0
  4. jottermem-0.1.0/BENCHMARKS.md +59 -0
  5. jottermem-0.1.0/LICENSE +202 -0
  6. jottermem-0.1.0/PKG-INFO +177 -0
  7. jottermem-0.1.0/PRD.md +146 -0
  8. jottermem-0.1.0/README.md +150 -0
  9. jottermem-0.1.0/benchmarks/locomo_benchmark.py +152 -0
  10. jottermem-0.1.0/benchmarks/staleness_benchmark.py +138 -0
  11. jottermem-0.1.0/examples/quickstart.py +44 -0
  12. jottermem-0.1.0/pyproject.toml +45 -0
  13. jottermem-0.1.0/src/jottermem/__init__.py +6 -0
  14. jottermem-0.1.0/src/jottermem/embeddings/__init__.py +5 -0
  15. jottermem-0.1.0/src/jottermem/embeddings/base.py +17 -0
  16. jottermem-0.1.0/src/jottermem/embeddings/hashing.py +41 -0
  17. jottermem-0.1.0/src/jottermem/embeddings/sentence_transformers.py +25 -0
  18. jottermem-0.1.0/src/jottermem/extraction/__init__.py +5 -0
  19. jottermem-0.1.0/src/jottermem/extraction/base.py +10 -0
  20. jottermem-0.1.0/src/jottermem/extraction/llm.py +63 -0
  21. jottermem-0.1.0/src/jottermem/extraction/rules.py +33 -0
  22. jottermem-0.1.0/src/jottermem/memory.py +201 -0
  23. jottermem-0.1.0/src/jottermem/models.py +31 -0
  24. jottermem-0.1.0/src/jottermem/py.typed +0 -0
  25. jottermem-0.1.0/src/jottermem/similarity.py +25 -0
  26. jottermem-0.1.0/src/jottermem/storage/__init__.py +3 -0
  27. jottermem-0.1.0/src/jottermem/storage/sqlite_store.py +380 -0
  28. jottermem-0.1.0/src/jottermem/text.py +23 -0
  29. jottermem-0.1.0/tests/conftest.py +9 -0
  30. jottermem-0.1.0/tests/test_benchmark.py +28 -0
  31. jottermem-0.1.0/tests/test_embeddings.py +38 -0
  32. jottermem-0.1.0/tests/test_extraction.py +24 -0
  33. jottermem-0.1.0/tests/test_llm_extraction.py +45 -0
  34. jottermem-0.1.0/tests/test_memory.py +88 -0
  35. jottermem-0.1.0/tests/test_sqlite_vec.py +142 -0
  36. jottermem-0.1.0/tests/test_store.py +59 -0
@@ -0,0 +1,25 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: ["3.9", "3.11", "3.12"]
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: ${{ matrix.python-version }}
19
+ - run: pip install -e ".[dev]"
20
+ - name: Report sqlite-vec extension-loading support
21
+ run: |
22
+ python -c "import sqlite3; print('enable_load_extension:', hasattr(sqlite3.Connection, 'enable_load_extension'))"
23
+ - run: python -m pytest -v tests/test_sqlite_vec.py
24
+ - run: python -m pytest -q
25
+ - run: mypy src/jottermem
@@ -0,0 +1,33 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - uses: actions/setup-python@v5
13
+ with:
14
+ python-version: "3.12"
15
+ - run: pip install build
16
+ - run: python -m build
17
+ - uses: actions/upload-artifact@v4
18
+ with:
19
+ name: dist
20
+ path: dist/
21
+
22
+ publish:
23
+ needs: build
24
+ runs-on: ubuntu-latest
25
+ environment: pypi
26
+ permissions:
27
+ id-token: write # required for PyPI Trusted Publishing (OIDC)
28
+ steps:
29
+ - uses: actions/download-artifact@v4
30
+ with:
31
+ name: dist
32
+ path: dist/
33
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,225 @@
1
+ # Downloaded benchmark datasets (not vendored; fetched at run time)
2
+ benchmarks/data/
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[codz]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py.cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+ cover/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ # Pipfile.lock
99
+
100
+ # UV
101
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ # uv.lock
105
+
106
+ # poetry
107
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
108
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
109
+ # commonly ignored for libraries.
110
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
111
+ # poetry.lock
112
+ # poetry.toml
113
+
114
+ # pdm
115
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
116
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
117
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
118
+ # pdm.lock
119
+ # pdm.toml
120
+ .pdm-python
121
+ .pdm-build/
122
+
123
+ # pixi
124
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
125
+ # pixi.lock
126
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
127
+ # in the .venv directory. It is recommended not to include this directory in version control.
128
+ .pixi
129
+
130
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
131
+ __pypackages__/
132
+
133
+ # Celery stuff
134
+ celerybeat-schedule
135
+ celerybeat.pid
136
+
137
+ # Redis
138
+ *.rdb
139
+ *.aof
140
+ *.pid
141
+
142
+ # RabbitMQ
143
+ mnesia/
144
+ rabbitmq/
145
+ rabbitmq-data/
146
+
147
+ # ActiveMQ
148
+ activemq-data/
149
+
150
+ # SageMath parsed files
151
+ *.sage.py
152
+
153
+ # Environments
154
+ .env
155
+ .envrc
156
+ .venv
157
+ env/
158
+ venv/
159
+ ENV/
160
+ env.bak/
161
+ venv.bak/
162
+
163
+ # Spyder project settings
164
+ .spyderproject
165
+ .spyproject
166
+
167
+ # Rope project settings
168
+ .ropeproject
169
+
170
+ # mkdocs documentation
171
+ /site
172
+
173
+ # mypy
174
+ .mypy_cache/
175
+ .dmypy.json
176
+ dmypy.json
177
+
178
+ # Pyre type checker
179
+ .pyre/
180
+
181
+ # pytype static type analyzer
182
+ .pytype/
183
+
184
+ # Cython debug symbols
185
+ cython_debug/
186
+
187
+ # PyCharm
188
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
189
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
190
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
191
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
192
+ # .idea/
193
+
194
+ # Abstra
195
+ # Abstra is an AI-powered process automation framework.
196
+ # Ignore directories containing user credentials, local state, and settings.
197
+ # Learn more at https://abstra.io/docs
198
+ .abstra/
199
+
200
+ # Visual Studio Code
201
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
202
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
203
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
204
+ # you could uncomment the following to ignore the entire vscode folder
205
+ # .vscode/
206
+ # Temporary file for partial code execution
207
+ tempCodeRunnerFile.py
208
+
209
+ # Ruff stuff:
210
+ .ruff_cache/
211
+
212
+ # PyPI configuration file
213
+ .pypirc
214
+
215
+ # Marimo
216
+ marimo/_static/
217
+ marimo/_lsp/
218
+ __marimo__/
219
+
220
+ # Streamlit
221
+ .streamlit/secrets.toml
222
+
223
+ # TraceMeter local data
224
+ *.db
225
+ .tracemeter/
@@ -0,0 +1,59 @@
1
+ # Benchmarks
2
+
3
+ ## Staleness benchmark
4
+
5
+ **What it tests:** the specific failure mode section 1.2 of the [PRD](PRD.md) calls out — "a fact like 'works at Company X' is correct until it isn't, and naive memory systems retrieve stale facts with the same confidence as current ones."
6
+
7
+ **What it is not:** the LoCoMo dataset, or any other external long-term-memory benchmark. It's a small, self-contained, fully reproducible synthetic scenario (`benchmarks/staleness_benchmark.py`) built to exercise that one failure mode directly, and it's pinned by a regression test (`tests/test_benchmark.py`) so the numbers below can't silently drift. A LoCoMo-style external benchmark is still on the roadmap (see PRD milestone 4) — this is the first, narrower proof point.
8
+
9
+ **Setup:** an 8-line synthetic conversation where three facts evolve over time (employer changes twice, city changes once, favorite drink changes once) and one line is a verbatim repeat. Both sides use jottermem's own `HashingEmbedder`, so the comparison isolates the memory-layer logic — dedup, key-based staleness, hybrid recall — from embedding quality.
10
+
11
+ - **Naive top-K:** every line stored as its own memory, plain cosine top-1 at query time. This is the "vector store + top-K" baseline the PRD frames as the status quo.
12
+ - **jottermem:** `remember()` with a stable `key` per evolving fact (`employer`, `city`, `drink`), `recall()` with default dedup + supersession + keyword-boosted hybrid scoring.
13
+
14
+ **Result** (`python benchmarks/staleness_benchmark.py`):
15
+
16
+ | | naive top-K | jottermem |
17
+ |---|---|---|
18
+ | lines written | 8 | 8 |
19
+ | memories stored | 8 | 7 (1 verbatim repeat deduped) |
20
+ | memories visible to `recall()` | 8 | 3 (4 superseded facts + the dedup hidden) |
21
+ | current-fact query accuracy | **0 / 3** | **3 / 3** |
22
+
23
+ Naive top-1 picks a stale fact for every query — same-subject restatements (`"works at Initech"` / `"...Acme Corp"` / `"...Globex"`) are close enough in cosine similarity that whichever one the index happens to rank first wins, with no signal that two of the three are outdated. jottermem's `recall()` only has the current fact to return for each subject, because the superseded ones were excluded by construction — not by winning a closer ranking.
24
+
25
+ Run it yourself:
26
+
27
+ ```bash
28
+ python benchmarks/staleness_benchmark.py
29
+ ```
30
+
31
+ ## LoCoMo retrieval benchmark
32
+
33
+ **What it tests:** whether jottermem's memory-layer logic — atomic fact extraction plus hybrid keyword-boosted recall — actually improves retrieval on real conversational data, not just the synthetic scenario above. Uses [LoCoMo](https://github.com/snap-research/locomo) (Maharana et al., *"Evaluating Very Long-Term Conversational Memory of LLM Agents,"* 2024), a published benchmark of 10 long-term multi-session conversations (5,882 turns total) with human-annotated QA pairs.
34
+
35
+ **What it is not:** an answer-generation benchmark. jottermem's `recall()` returns memories, not generated answers, so this measures *retrieval* — Recall@k over the paper's single-hop QA category (795 questions, each with exactly one ground-truth evidence turn): does that turn appear in the top-k results? It's also not using a semantic embedder — both sides use jottermem's own dependency-free `HashingEmbedder`, isolating the memory-layer logic from embedding quality, same as the staleness benchmark above.
36
+
37
+ **Not vendored:** the dataset's source repo carries no asserted open-source license, so `benchmarks/locomo_benchmark.py` downloads it at run time into `benchmarks/data/` (gitignored) rather than redistributing a copy here.
38
+
39
+ - **Naive top-K:** every conversation turn stored as its own memory, plain cosine ranking at query time.
40
+ - **jottermem:** `remember()` per turn (splits multi-sentence turns into atomic facts, dedups near-identical restatements), `recall()` with hybrid keyword-boosted scoring.
41
+
42
+ **Result** (`python benchmarks/locomo_benchmark.py`, ~6 minutes, 795 single-hop questions across 10 conversations):
43
+
44
+ | k | naive Recall@k | jottermem Recall@k |
45
+ |---|---|---|
46
+ | 1 | 8.8% | **17.2%** |
47
+ | 3 | 15.7% | **27.4%** |
48
+ | 5 | 18.9% | **31.7%** |
49
+ | 10 | 24.9% | **37.7%** |
50
+
51
+ jottermem roughly **doubles** naive top-K's Recall@k at every k on real conversational data. The absolute numbers are modest by design — `HashingEmbedder` is lexical, not semantic, so this isn't state-of-the-art retrieval — but the *relative* improvement is the point: splitting turns into atomic facts (directly addressing the chunk-boundary problem from [PRD §1.2](PRD.md)) plus hybrid keyword scoring measurably improves what gets retrieved, using the exact same embedder on both sides. Swapping in `SentenceTransformerEmbedder` would likely raise the absolute numbers further on both sides; that comparison isn't run here yet.
52
+
53
+ **Acceleration speedup, same data:** brute-force cosine scanning is the bottleneck at this scale — on `conv-26` (419 turns, 69 questions), `remember()` + `recall()` for the whole conversation took **14.8s** brute-force versus **0.39s** with `sqlite-vec` acceleration (`use_sqlite_vec=True`), a **~38x** speedup with identical results. This is what the [sqlite-vec acceleration](README.md#accelerating-search-with-sqlite-vec) is for.
54
+
55
+ Run it yourself (downloads ~2.7MB on first run):
56
+
57
+ ```bash
58
+ python benchmarks/locomo_benchmark.py
59
+ ```
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.