PK!Tppconceptnet_lite/__init__.pyfrom pathlib import Path from typing import Iterable, Optional import peewee from conceptnet_lite.db import CONCEPTNET_EDGE_COUNT, CONCEPTNET_DUMP_DOWNLOAD_URL, CONCEPTNET_DB_NAME from conceptnet_lite.db import Concept, Language, Label, Relation, RelationName, Edge from conceptnet_lite.db import prepare_db, _open_db, _generate_db_path, download_db from conceptnet_lite.utils import PathOrStr, _to_snake_case def connect( db_path: PathOrStr = CONCEPTNET_DB_NAME, db_download_url: Optional[str] = None, delete_compressed_db: bool = True, dump_download_url: str = CONCEPTNET_DUMP_DOWNLOAD_URL, load_dump_edge_count: int = CONCEPTNET_EDGE_COUNT, delete_compressed_dump: bool = True, delete_dump: bool = True, ) -> None: """Connect to ConceptNet database. This function connects to ConceptNet database. If it does not exists, there are two options: to download ready database (you should supply `db_download_url`) or to download the compressed ConceptNet dump, unpack it, load it into database (the default option, please check if defaults are suitable for you). Args: db_path: Path to the database. db_download_url: Link to compressed ConceptNet database. delete_compressed_db: Delete compressed database after extraction. dump_download_url: Link to compressed ConceptNet dump. load_dump_edge_count: Number of edges to load from the beginning of the dump file. Can be useful for testing. delete_compressed_dump: Delete compressed dump after unpacking. delete_dump: Delete dump after loading into database. """ db_path = Path(db_path).expanduser().resolve() if db_path.is_dir(): db_path = _generate_db_path(db_path) try: if db_path.is_file(): _open_db(path=db_path) else: raise FileNotFoundError(2, "No such file", str(db_path)) except FileNotFoundError: print(f"File not found: {db_path}") if db_download_url is not None: download_db( url=db_download_url, db_path=db_path, delete_compressed_db=delete_compressed_db, ) _open_db(db_path) else: prepare_db( db_path=db_path, dump_download_url=dump_download_url, load_dump_edge_count=load_dump_edge_count, delete_compressed_dump=delete_compressed_dump, delete_dump=delete_dump, ) def edges_from( start_concepts: Iterable[Concept], relation: Optional[Relation] = None, same_language: bool = False, ) -> peewee.BaseModelSelect: start_concepts = list(start_concepts) result = Edge.select().where(Edge.start.in_(start_concepts)) if relation is not None: result = result.where(Edge.relation == relation) if same_language: ConceptAlias = Concept.alias() result = (result .join(ConceptAlias, on=(ConceptAlias.id == Edge.end)) .join(Label) .join(Language) .where(Language.id == start_concepts[0].label.language)) return result def edges_to( end_concepts: Iterable[Concept], relation: Optional[Relation] = None, same_language: bool = False, ) -> peewee.BaseModelSelect: end_concepts = list(end_concepts) result = Edge.select().where(Edge.end.in_(end_concepts)) if relation is not None: result = result.where(Edge.relation == relation) if same_language: ConceptAlias = Concept.alias() result = (result .join(ConceptAlias, on=(ConceptAlias.id == Edge.start)) .join(Label) .join(Language) .where(Language.id == end_concepts[0].label.language)) return result def edges_for( concepts: Iterable[Concept], relation: Optional[Relation] = None, same_language: bool = False, ) -> peewee.BaseModelSelect: return (edges_from(concepts, relation=relation, same_language=same_language) | edges_to(concepts, relation=relation, same_language=same_language)) def edges_between( start_concepts: Iterable[Concept], end_concepts: Iterable[Concept], relation: Optional[Relation] = None, two_way: bool = False, ) -> peewee.BaseModelSelect: condition = Edge.start.in_(start_concepts) & Edge.end.in_(end_concepts) if two_way: condition |= Edge.start.in_(end_concepts) & Edge.end.in_(start_concepts) if relation is not None: condition &= Edge.relation == relation return Edge.select().where(condition) PK!RCCCCconceptnet_lite/db.pyimport csv import gzip import shutil import struct import zipfile from functools import partial from pathlib import Path from typing import Optional, Generator, Tuple from uuid import uuid4 import lmdb from multithread import Downloader from pySmartDL import SmartDL from tqdm import tqdm from peewee import DatabaseProxy, Model, TextField, ForeignKeyField from playhouse.sqlite_ext import JSONField, SqliteExtDatabase from conceptnet_lite.utils import PathOrStr, _to_snake_case class RelationName: """Names of non-deprecated relations. See: https://github.com/commonsense/conceptnet5/wiki/Relations. """ RELATED_TO = 'related_to' FORM_OF = 'form_of' IS_A = 'is_a' PART_OF = 'part_of' HAS_A = 'has_a' USED_FOR = 'used_for' CAPABLE_OF = 'capable_of' AT_LOCATION = 'at_location' CAUSES = 'causes' HAS_SUBEVENT = 'has_subevent' HAS_FIRST_SUBEVENT = 'has_first_subevent' HAS_LAST_SUBEVENT = 'has_last_subevent' HAS_PREREQUISITE = 'has_prerequisite' HAS_PROPERTY = 'has_property' MOTIVATED_BY_GOAL = 'motivated_by_goal' OBSTRUCTED_BY = 'obstructed_by' DESIRES = 'desires' CREATED_BY = 'created_by' SYNONYM = 'synonym' ANTONYM = 'antonym' DISTINCT_FROM = 'distinct_from' DERIVED_FROM = 'derived_from' SYMBOL_OF = 'symbol_of' DEFINED_AS = 'defined_as' MANNER_OF = 'manner_of' LOCATED_NEAR = 'located_near' HAS_CONTEXT = 'has_context' SIMILAR_TO = 'similar_to' ETYMOLOGICALLY_RELATED_TO = 'etymologically_related_to' ETYMOLOGICALLY_DERIVED_FROM = 'etymologically_derived_from' CAUSES_DESIRE = 'causes_desire' MADE_OF = 'made_of' RECEIVES_ACTION = 'receives_action' EXTERNAL_URL = 'external_url' db = DatabaseProxy() class _BaseModel(Model): class Meta: database = db class Relation(_BaseModel): """Relation ORM class. See: https://github.com/commonsense/conceptnet5/wiki/Relations. """ name = TextField(unique=True) @property def uri(self) -> str: return f'/r/{self.name}' class Language(_BaseModel): """Language ORM class. See: https://github.com/commonsense/conceptnet5/wiki/Languages. """ name = TextField(unique=True) class Label(_BaseModel): """Label ORM class. :class:`Label` can be seen as a part of :class:`Concept`. :class:`Label` is basically a text on a certain language (most often, a word). This abstraction is not present in the original ConceptNet. Class is introduced for the purposes of normalization. """ text = TextField(index=True) language = ForeignKeyField(Language, backref='labels') class Concept(_BaseModel): """Concept ORM class. :class:`Concept` represents node in ConceptNet knowledge graph. It provides properties :attr:`language` and :attr:`text` that are aliases for corresponding :attr:`Label.language` and :attr:`Label.text` fields. This abstraction is not present in the original ConceptNet. Class is introduced for the purposes of normalization. """ label = ForeignKeyField(Label, backref='concepts') sense_label = TextField() @property def uri(self) -> str: ending = f'/{self.sense_label}' if self.sense_label else '' return f'/c/{self.language.name}/{self.text}{ending}' @property def language(self) -> Language: return self.label.language @property def text(self) -> str: return self.label.text class Edge(_BaseModel): """Edge ORM class. See: https://github.com/commonsense/conceptnet5/wiki/Edges. Everything except relation, start, and end nodes is stored in :attr:`etc` field that is plain :class:`dict`. """ relation = ForeignKeyField(Relation, backref='edges') start = ForeignKeyField(Concept, backref='edges_out') end = ForeignKeyField(Concept, backref='edges_in') etc = JSONField() @property def uri(self) -> str: return f'/a/[{self.relation.uri}/,{self.start.uri}/,{self.end.uri}/]' def _open_db(path: PathOrStr): db.initialize(SqliteExtDatabase(str(path), pragmas={ 'synchronous': 0, 'cache_size': -1024 * 64, })) tables = [Relation, Language, Label, Concept, Edge] db.create_tables(tables) # For ConceptNet 5.7: CONCEPTNET_DUMP_DOWNLOAD_URL = ( 'https://s3.amazonaws.com/conceptnet/downloads/2019/edges/conceptnet-assertions-5.7.0.csv.gz') CONCEPTNET_EDGE_COUNT = 34074917 CONCEPTNET_DB_NAME = 'conceptnet.db' def _get_download_destination_path(dir_path: Path, url: str) -> Path: return dir_path / url.rsplit('/')[-1] def download_dump( url: str = CONCEPTNET_DUMP_DOWNLOAD_URL, out_dir_path: PathOrStr = Path.cwd(), ): """Download compressed ConceptNet dump. Args: url: Link to the dump. out_dir_path: Dir where to store dump. """ print("Download compressed dump") compressed_dump_path = _get_download_destination_path(out_dir_path, url) if compressed_dump_path.is_file(): raise FileExistsError(17, "File already exists", str(compressed_dump_path)) downloader = SmartDL(url, str(compressed_dump_path)) downloader.start() def extract_compressed_dump( compressed_dump_path: PathOrStr, delete_compressed_dump: bool = True, ): """Extract compressed ConceptNet dump. Args: compressed_dump_path: Path to compressed dump to extract. delete_compressed_dump: Delete compressed dump after extraction. """ dump_path = Path(compressed_dump_path).with_suffix('') try: with gzip.open(str(compressed_dump_path), 'rb') as f_in: with open(str(dump_path), 'wb') as f_out: print("Extract compressed dump (this can take a few minutes)") shutil.copyfileobj(f_in, f_out) finally: if delete_compressed_dump and compressed_dump_path.is_file(): compressed_dump_path.unlink() def load_dump_to_db( dump_path: PathOrStr, db_path: PathOrStr, edge_count: int = CONCEPTNET_EDGE_COUNT, delete_dump: bool = True, ): """Load dump to database. Args: dump_path: Path to dump to load. db_path: Path to resulting database. edge_count: Number of edges to load from the beginning of the dump file. Can be useful for testing. delete_dump: Delete dump after loading into database. """ def edges_from_dump_by_parts_generator( count: Optional[int] = None, ) -> Generator[Tuple[str, str, str, str], None, None]: with open(str(dump_path), newline='') as f: reader = csv.reader(f, delimiter='\t') for i, row in enumerate(reader): if i == count: break yield row[1:5] def extract_relation_name(uri: str) -> str: return _to_snake_case(uri[3:]) def get_struct_format(length: int) -> str: return f'{length}Q' def pack_ints(*ints) -> bytes: return struct.pack(get_struct_format(length=len(ints)), *ints) def unpack_ints(buffer: bytes) -> Tuple[int, ...]: return struct.unpack(get_struct_format(len(buffer) // 8), buffer) def relation_in_bytes(relation_uri: str) -> bytes: relation_name = extract_relation_name(relation_uri) return relation_name.encode('utf8') def language_and_label_in_bytes(concept_uri: str) -> Tuple[bytes, bytes]: return tuple(x.encode('utf8') for x in concept_uri.split('/', maxsplit=4)[2:4])[:2] def normalize() -> None: """Normalize dump before loading into database using lmdb.""" def normalize_relation() -> None: nonlocal relation_i relation_b = relation_in_bytes(relation_uri=relation_uri) relation_exists = txn.get(relation_b, db=relation_db) is not None if not relation_exists: relation_i += 1 relation_i_b = pack_ints(relation_i) txn.put(relation_b, relation_i_b, db=relation_db) def normalize_concept(uri: str) -> None: nonlocal language_i, label_i, concept_i language_b, label_b = language_and_label_in_bytes(concept_uri=uri) language_id_b = txn.get(language_b, db=language_db) if language_id_b is None: language_i += 1 language_id_b = pack_ints(language_i) txn.put(language_b, language_id_b, db=language_db) label_language_b = label_b + b'/' + language_b label_id_b = txn.get(label_language_b, db=label_db) if label_id_b is None: label_i += 1 label_id_b = pack_ints(label_i) txn.put(label_language_b, label_id_b, db=label_db) concept_b = uri.encode('utf8') concept_id_b = txn.get(concept_b, db=concept_db) if concept_id_b is None: concept_i += 1 concept_id_b = pack_ints(concept_i) txn.put(concept_b, concept_id_b, db=concept_db) language_i, relation_i, label_i, concept_i = 4 * [0] if not dump_path.is_file(): raise FileNotFoundError(2, 'No such file', str(dump_path)) print('Dump normalization') edges = enumerate(edges_from_dump_by_parts_generator(count=edge_count)) for i, (relation_uri, start_uri, end_uri, _) in tqdm(edges, unit=' edges', total=edge_count): normalize_relation() normalize_concept(start_uri) normalize_concept(end_uri) def insert() -> None: """Load dump from CSV and lmdb database into database.""" def insert_objects_from_edge(): nonlocal edge_i def insert_relation() -> int: nonlocal relation_i relation_b = relation_in_bytes(relation_uri=relation_uri) result_id, = unpack_ints(buffer=txn.get(relation_b, db=relation_db)) if result_id == relation_i: name = relation_b.decode('utf8') db.execute_sql('insert into relation (name) values (?)', (name, )) relation_i += 1 return result_id def insert_concept(uri: str) -> int: nonlocal language_i, label_i, concept_i split_uri = uri.split('/', maxsplit=4) language_b, label_b = language_and_label_in_bytes(concept_uri=uri) language_id, = unpack_ints(buffer=txn.get(language_b, db=language_db)) if language_id == language_i: name = split_uri[2] db.execute_sql('insert into language (name) values (?)', (name, )) language_i += 1 label_language_b = label_b + b'/' + language_b label_id, = unpack_ints(buffer=txn.get(label_language_b, db=label_db)) if label_id == label_i: text = split_uri[3] params = (text, language_id) db.execute_sql('insert into label (text, language_id) values (?, ?)', params) label_i += 1 concept_b = uri.encode('utf8') concept_id, = unpack_ints(buffer=txn.get(concept_b, db=concept_db)) if concept_id == concept_i: sense_label = '' if len(split_uri) == 4 else split_uri[4] params = (label_id, sense_label) db.execute_sql('insert into concept (label_id, sense_label) values (?, ?)', params) concept_i += 1 return concept_id def insert_edge() -> None: params = (relation_id, start_id, end_id, edge_etc) db.execute_sql('insert into edge (relation_id, start_id, end_id, etc) values (?, ?, ?, ?)', params) relation_id = insert_relation() start_id = insert_concept(uri=start_uri) end_id = insert_concept(uri=end_uri) insert_edge() edge_i += 1 print('Dump insertion') relation_i, language_i, label_i, concept_i, edge_i = 5 * [1] edges = edges_from_dump_by_parts_generator(count=edge_count) progress_bar = tqdm(unit=' edges', total=edge_count) finished = False while not finished: edge_count_per_insert = 1000000 with db.atomic(): for _ in range(edge_count_per_insert): try: relation_uri, start_uri, end_uri, edge_etc = next(edges) except StopIteration: finished = True break insert_objects_from_edge() progress_bar.update() GIB = 1 << 30 dump_path = Path(dump_path) lmdb_db_path = dump_path.parent / f'conceptnet-lmdb-{uuid4()}.db' env = lmdb.open(str(lmdb_db_path), map_size=4*GIB, max_dbs=5, sync=False, writemap=False) relation_db = env.open_db(b'relation') language_db = env.open_db(b'language') label_db = env.open_db(b'label') concept_db = env.open_db(b'concept') try: with env.begin(write=True) as txn: normalize() _open_db(path=db_path) insert() finally: shutil.rmtree(str(lmdb_db_path), ignore_errors=True) if delete_dump and dump_path.is_file(): dump_path.unlink() def _generate_db_path(db_dir_path: Path) -> Path: return db_dir_path / CONCEPTNET_DB_NAME def prepare_db( db_path: PathOrStr, dump_download_url: str = CONCEPTNET_DUMP_DOWNLOAD_URL, load_dump_edge_count: int = CONCEPTNET_EDGE_COUNT, delete_compressed_dump: bool = True, delete_dump: bool = True, ): """Prepare ConceptNet database. This function downloads the compressed ConceptNet dump, unpacks it, and loads it into database. First two steps are optional, and are executed only if needed. Args: db_path: Path to the resulting database. dump_download_url: Link to compressed ConceptNet dump. load_dump_edge_count: Number of edges to load from the beginning of the dump file. Can be useful for testing. delete_compressed_dump: Delete compressed dump after extraction. delete_dump: Delete dump after loading into database. """ db_path = Path(db_path).expanduser().resolve() if db_path.is_dir(): db_path = _generate_db_path(db_path) if db_path.is_file(): raise FileExistsError(17, "File already exists and it is not a valid database", str(db_path)) print("Prepare database") compressed_dump_path = _get_download_destination_path(db_path.parent, CONCEPTNET_DUMP_DOWNLOAD_URL) dump_path = compressed_dump_path.with_suffix('') db_path.parent.mkdir(parents=True, exist_ok=True) load_dump_to_db_ = partial( load_dump_to_db, dump_path=dump_path, db_path=db_path, edge_count=load_dump_edge_count, delete_dump=delete_dump, ) extract_compressed_dump_ = partial( extract_compressed_dump, compressed_dump_path=compressed_dump_path, delete_compressed_dump=delete_compressed_dump, ) download_dump_ = partial( download_dump, url=dump_download_url, out_dir_path=db_path.parent, ) try: load_dump_to_db_() except FileNotFoundError: try: extract_compressed_dump_() load_dump_to_db_() except FileNotFoundError: download_dump_() extract_compressed_dump_() load_dump_to_db_() finally: if delete_compressed_dump and compressed_dump_path.is_file(): compressed_dump_path.unlink() if delete_dump and dump_path.is_file(): dump_path.unlink() def download_db(url: str, db_path: PathOrStr = CONCEPTNET_DB_NAME, delete_compressed_db: bool = True) -> None: """Download compressed ConceptNet dump and extract it. Args: url: Link to compressed ConceptNet database. db_path: Path to resulting database. delete_compressed_db: Delete compressed database after extraction. """ print("Download compressed database") db_path = Path(db_path).expanduser().resolve() if db_path.is_dir(): db_path = _generate_db_path(db_path) if db_path.is_file(): raise FileExistsError(17, "File already exists", str(db_path)) compressed_db_path = _get_download_destination_path(db_path.parent, url) if compressed_db_path.is_file(): raise FileExistsError(17, "File already exists", str(compressed_db_path)) downloader = SmartDL(url, str(compressed_db_path)) downloader.start() try: with zipfile.ZipFile(str(compressed_db_path), 'r') as zip_f: print("Extract compressed database (this can take a few minutes)") zip_f.extractall(db_path.parent) if db_path.name != CONCEPTNET_DB_NAME: Path(db_path.parent / CONCEPTNET_DB_NAME).rename(db_path) finally: if delete_compressed_db and compressed_db_path.is_file(): compressed_db_path.unlink() PK!׶conceptnet_lite/utils.pyimport re from pathlib import Path from typing import Union PathOrStr = Union[Path, str] def _to_snake_case(s: str) -> str: regex = re.compile('((?<=[a-z0-9])[A-Z]|(?!^)[A-Z](?=[a-z]))') return regex.sub(r'_\1', s).lower() PK!]{],],(conceptnet_lite-0.1.21.dist-info/LICENSE Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. PK!H\TT&conceptnet_lite-0.1.21.dist-info/WHEEL 1 0 нR \I$ơ7.ZON `h6oi14m,b4>4ɛpK>X;baP>PK!HOeU5)conceptnet_lite-0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