添加服务
This commit is contained in:
parent
da44517b80
commit
f88d5251e2
0
llmengine/__init__.py
Normal file
0
llmengine/__init__.py
Normal file
BIN
llmengine/__pycache__/ahserver.cpython-310.pyc
Normal file
BIN
llmengine/__pycache__/ahserver.cpython-310.pyc
Normal file
Binary file not shown.
BIN
llmengine/__pycache__/base_entity.cpython-310.pyc
Normal file
BIN
llmengine/__pycache__/base_entity.cpython-310.pyc
Normal file
Binary file not shown.
BIN
llmengine/__pycache__/base_triple.cpython-310.pyc
Normal file
BIN
llmengine/__pycache__/base_triple.cpython-310.pyc
Normal file
Binary file not shown.
BIN
llmengine/__pycache__/entity.cpython-310.pyc
Normal file
BIN
llmengine/__pycache__/entity.cpython-310.pyc
Normal file
Binary file not shown.
BIN
llmengine/__pycache__/ltpentity.cpython-310.pyc
Normal file
BIN
llmengine/__pycache__/ltpentity.cpython-310.pyc
Normal file
Binary file not shown.
BIN
llmengine/__pycache__/milvus_connection.cpython-310.pyc
Normal file
BIN
llmengine/__pycache__/milvus_connection.cpython-310.pyc
Normal file
Binary file not shown.
BIN
llmengine/__pycache__/mrebeltriple.cpython-310.pyc
Normal file
BIN
llmengine/__pycache__/mrebeltriple.cpython-310.pyc
Normal file
Binary file not shown.
27
llmengine/base_connection.py
Normal file
27
llmengine/base_connection.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
from abc import ABC, abstractmethod
|
||||||
|
from typing import Dict
|
||||||
|
from appPublic.log import debug, error, info, exception
|
||||||
|
|
||||||
|
connection_pathMap = {}
|
||||||
|
|
||||||
|
def connection_register(connection_key, Klass):
|
||||||
|
"""为给定的连接键注册一个连接类"""
|
||||||
|
global connection_pathMap
|
||||||
|
connection_pathMap[connection_key] = Klass
|
||||||
|
info(f"Registered {connection_key} with class {Klass}")
|
||||||
|
|
||||||
|
def get_connection_class(connection_path):
|
||||||
|
"""根据连接路径查找对应的连接类"""
|
||||||
|
global connection_pathMap
|
||||||
|
debug(f"connection_pathMap: {connection_pathMap}")
|
||||||
|
klass = connection_pathMap.get(connection_path)
|
||||||
|
if klass is None:
|
||||||
|
error(f"{connection_path} has not mapping to a connection class")
|
||||||
|
raise Exception(f"{connection_path} has not mapping to a connection class")
|
||||||
|
return klass
|
||||||
|
|
||||||
|
class BaseConnection(ABC):
|
||||||
|
@abstractmethod
|
||||||
|
async def handle_connection(self, action: str, params: Dict = None) -> Dict:
|
||||||
|
"""处理数据库操作,根据 action 执行创建集合等"""
|
||||||
|
pass
|
||||||
23
llmengine/base_entity.py
Normal file
23
llmengine/base_entity.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
from abc import ABC, abstractmethod
|
||||||
|
from typing import List
|
||||||
|
|
||||||
|
model_pathMap = {}
|
||||||
|
|
||||||
|
def ltp_register(model_key, Klass):
|
||||||
|
"""Register a model class for a given model key."""
|
||||||
|
global model_pathMap
|
||||||
|
model_pathMap[model_key] = Klass
|
||||||
|
|
||||||
|
def get_ltp_class(model_path):
|
||||||
|
"""Find the model class for a given model path."""
|
||||||
|
for k, klass in model_pathMap.items():
|
||||||
|
if len(model_path.split(k)) > 1:
|
||||||
|
return klass
|
||||||
|
print(f'{model_pathMap=}')
|
||||||
|
return None
|
||||||
|
|
||||||
|
class BaseLtp(ABC):
|
||||||
|
@abstractmethod
|
||||||
|
def extract_entities(self, query: str) -> List[str]:
|
||||||
|
"""Extract entities from query text."""
|
||||||
|
pass
|
||||||
51
llmengine/base_triple.py
Normal file
51
llmengine/base_triple.py
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import torch
|
||||||
|
from abc import ABC, abstractmethod
|
||||||
|
from appPublic.log import debug
|
||||||
|
import os
|
||||||
|
|
||||||
|
model_pathMap = {}
|
||||||
|
|
||||||
|
def llm_register(model_key: str, Klass):
|
||||||
|
"""Register a triplet extractor class for a given model key."""
|
||||||
|
global model_pathMap
|
||||||
|
model_pathMap[model_key] = Klass
|
||||||
|
debug(f"Registered {Klass.__name__} for model_key: {model_key}")
|
||||||
|
|
||||||
|
|
||||||
|
def get_llm_class(model_path: str):
|
||||||
|
"""Return the triplet extractor class for the given model path."""
|
||||||
|
for k, klass in model_pathMap.items():
|
||||||
|
if k in model_path:
|
||||||
|
return klass
|
||||||
|
debug(f"No class found for model_path: {model_path}, model_pathMap: {model_pathMap}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
class BaseTripleExtractor(ABC):
|
||||||
|
"""Base class for triplet extraction."""
|
||||||
|
|
||||||
|
def __init__(self, model_path: str):
|
||||||
|
self.model_path = model_path
|
||||||
|
self.model_name = os.path.basename(model_path)
|
||||||
|
self.model = None
|
||||||
|
debug(f"Initialized BaseTripleExtractor with model_path: {model_path}")
|
||||||
|
|
||||||
|
def use_mps_if_possible(self):
|
||||||
|
"""Select device (MPS, CUDA, or CPU)."""
|
||||||
|
if torch.backends.mps.is_available():
|
||||||
|
device = torch.device("mps")
|
||||||
|
debug("Using MPS device")
|
||||||
|
elif torch.cuda.is_available():
|
||||||
|
device = torch.device("cuda")
|
||||||
|
debug("Using CUDA device")
|
||||||
|
else:
|
||||||
|
device = torch.device("cpu")
|
||||||
|
debug("Using CPU device")
|
||||||
|
if self.model is not None:
|
||||||
|
self.model = self.model.to(device)
|
||||||
|
return device
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
async def extract_triplets(self, text: str) -> list:
|
||||||
|
"""Extract triplets from text."""
|
||||||
|
pass
|
||||||
27
llmengine/bgeembedding.py
Normal file
27
llmengine/bgeembedding.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
import torch
|
||||||
|
from langchain_huggingface import HuggingFaceEmbeddings
|
||||||
|
from llmengine.base_embedding import BaseEmbedding, llm_register
|
||||||
|
|
||||||
|
class BgeEmbedding(BaseEmbedding):
|
||||||
|
def __init__(self, model_id):
|
||||||
|
self.model_id = model_id
|
||||||
|
self.model_name = model_id.split('/')[-1]
|
||||||
|
self.model = HuggingFaceEmbeddings(
|
||||||
|
model_name=model_id,
|
||||||
|
model_kwargs={'device': 'cuda' if torch.cuda.is_available() else 'cpu'},
|
||||||
|
encode_kwargs={
|
||||||
|
"batch_size": 12,
|
||||||
|
"max_length": 8192,
|
||||||
|
'normalize_embeddings': True
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
def encode(self, input):
|
||||||
|
ret = []
|
||||||
|
for t in input:
|
||||||
|
embedding = self.model.embed_query(t)
|
||||||
|
ret.append(embedding)
|
||||||
|
return ret
|
||||||
|
|
||||||
|
llm_register('bge-m3', BgeEmbedding)
|
||||||
151
llmengine/client/chat
Normal file
151
llmengine/client/chat
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
#!/d/ymq/py3/bin/python
|
||||||
|
from traceback import format_exc
|
||||||
|
import asyncio
|
||||||
|
import codecs
|
||||||
|
import json
|
||||||
|
import base64
|
||||||
|
import argparse
|
||||||
|
from appPublic.streamhttpclient import liner, StreamHttpClient
|
||||||
|
from appPublic.log import MyLogger
|
||||||
|
|
||||||
|
filetypes = {
|
||||||
|
'png': ['image_url', 'data:image/png'],
|
||||||
|
'jpg': ['image_url', 'data:image/jpeg'],
|
||||||
|
'jpeg': ['image_url', 'data:image/jpeg'],
|
||||||
|
'wav': ['audio_url', 'data:audio/wav'],
|
||||||
|
'mp3': ['audio_url', 'data:audio/mp3'],
|
||||||
|
'mp4': ['video_url', 'data:video/mp4'],
|
||||||
|
'avi': ['video_url', 'data:video/avi']
|
||||||
|
}
|
||||||
|
|
||||||
|
def file2base64i_content(f):
|
||||||
|
ft = f.split('.')[-1].lower()
|
||||||
|
typ, content = filetypes.get(ft, '')
|
||||||
|
with open(f, 'rb') as f:
|
||||||
|
b = f.read()
|
||||||
|
b64 = base64.b64encode(b)
|
||||||
|
return {
|
||||||
|
'type': typ,
|
||||||
|
typ: {
|
||||||
|
'url': content
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class M2T:
|
||||||
|
def system_message(self, prompt):
|
||||||
|
return {
|
||||||
|
'role':'system',
|
||||||
|
'content': [{
|
||||||
|
'type': 'text',
|
||||||
|
'text'" prompt
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
def assistant_message(self, prompt):
|
||||||
|
return {
|
||||||
|
'role': 'assistant',
|
||||||
|
'content': [{
|
||||||
|
'type': 'text',
|
||||||
|
'text': promot
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
def user_message(self, prompt, textfile=None,
|
||||||
|
audiofile=None,
|
||||||
|
videofile=None,
|
||||||
|
imagefile=None):
|
||||||
|
txt = prompt
|
||||||
|
if textpath:
|
||||||
|
txt = f'{prompt}: {self.user_file(textfile)}'
|
||||||
|
content = [
|
||||||
|
{
|
||||||
|
'type': 'text',
|
||||||
|
'text': txt
|
||||||
|
}
|
||||||
|
]
|
||||||
|
for f in [audiofile, videofile, imagefile]:
|
||||||
|
if isinstance(f, []):
|
||||||
|
for f1 in f:
|
||||||
|
content.append(file2base64_content(f1))
|
||||||
|
elif isinstance(f, str):
|
||||||
|
content.append(file2base64_content(f)
|
||||||
|
|
||||||
|
return {
|
||||||
|
'role': 'user',
|
||||||
|
'content': content
|
||||||
|
}
|
||||||
|
|
||||||
|
def user_file(self, fn):
|
||||||
|
with codecs.open(fn, 'r', 'utf-8') as f:
|
||||||
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
|
class T2T:
|
||||||
|
def system_message(self, prompt):
|
||||||
|
return {
|
||||||
|
'role':'system',
|
||||||
|
'content': prompt
|
||||||
|
}
|
||||||
|
|
||||||
|
def assistant_message(self, prompt):
|
||||||
|
return {
|
||||||
|
'role': 'assistant',
|
||||||
|
'content': promot
|
||||||
|
}
|
||||||
|
|
||||||
|
def user_message(self, prompt, filepath=None):
|
||||||
|
if filepath:
|
||||||
|
prompt += f':{user_file(filepath)}'
|
||||||
|
return {
|
||||||
|
'role': 'user',
|
||||||
|
'content': prompt
|
||||||
|
}
|
||||||
|
|
||||||
|
def user_file(self, fn):
|
||||||
|
with codecs.open(fn, 'r', 'utf-8') as f:
|
||||||
|
return f.read()
|
||||||
|
|
||||||
|
async def main():
|
||||||
|
parser = argparse.ArgumentParser(prog='llmclient')
|
||||||
|
parser.add_argument('-f', '--textfile')
|
||||||
|
parser.add_argument('-i', '--imagefile')
|
||||||
|
parser.add_argument('-v', '--videofile')
|
||||||
|
parser.add_argument('-a', '--audiofile')
|
||||||
|
parser.add_argument('-s', '--sys_prompt')
|
||||||
|
parser.add_argument('-S', '--sessionfile')
|
||||||
|
parser.add_argument('-m', '--model')
|
||||||
|
parser.add_argument('url')
|
||||||
|
parser.add_argument('prompt')
|
||||||
|
args = parser.parse_args()
|
||||||
|
messages = [ system_message(args.sys_prompt) ] if args.sys_prompt else []
|
||||||
|
messages.append(user_message(args.prompt, filepath=args.file))
|
||||||
|
|
||||||
|
d = {
|
||||||
|
'model': args.model,
|
||||||
|
'stream': True,
|
||||||
|
'messages': messages
|
||||||
|
}
|
||||||
|
hc = StreamHttpClient()
|
||||||
|
headers = {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
i = 0
|
||||||
|
buffer = ''
|
||||||
|
reco = hc('POST', args.url, headers=headers, data=json.dumps(d))
|
||||||
|
async for chunk in liner(reco):
|
||||||
|
chunk = chunk[6:]
|
||||||
|
if chunk != '[DONE]':
|
||||||
|
try:
|
||||||
|
f = json.loads(chunk)
|
||||||
|
except Exception as e:
|
||||||
|
print(f'****{chunk=} error {e} {format_exc()}')
|
||||||
|
continue
|
||||||
|
if not f['choices'][0]['finish_reason']:
|
||||||
|
print(f['choices'][0]['delta']['content'], end='', flush=True)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
print('\n\n')
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
MyLogger('null', levelname='error', logfile='/dev/null')
|
||||||
|
asyncio.new_event_loop().run_until_complete(main())
|
||||||
74
llmengine/client/m2t
Normal file
74
llmengine/client/m2t
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#!/d/ymq/py3/bin/python
|
||||||
|
from traceback import format_exc
|
||||||
|
import asyncio
|
||||||
|
import codecs
|
||||||
|
import json
|
||||||
|
import argparse
|
||||||
|
from appPublic.streamhttpclient import liner, StreamHttpClient
|
||||||
|
from appPublic.log import MyLogger
|
||||||
|
|
||||||
|
def system_message(prompt):
|
||||||
|
return {
|
||||||
|
'role':'system',
|
||||||
|
'content':[{
|
||||||
|
'type': 'text',
|
||||||
|
'text': prompt
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
def user_message(prompt, filepath=None, **kwargs):
|
||||||
|
if filepath:
|
||||||
|
prompt += f':{user_file(filepath)}'
|
||||||
|
content = [{
|
||||||
|
'type': 'text',
|
||||||
|
'text': prompt
|
||||||
|
}]
|
||||||
|
return {
|
||||||
|
'role': 'user',
|
||||||
|
'content': content
|
||||||
|
}
|
||||||
|
|
||||||
|
def user_file(fn):
|
||||||
|
with codecs.open(fn, 'r', 'utf-8') as f:
|
||||||
|
return f.read()
|
||||||
|
|
||||||
|
async def main():
|
||||||
|
parser = argparse.ArgumentParser(prog='devops')
|
||||||
|
parser.add_argument('-f', '--file')
|
||||||
|
parser.add_argument('-p', '--prompt')
|
||||||
|
parser.add_argument('-s', '--sys_prompt')
|
||||||
|
parser.add_argument('-m', '--model')
|
||||||
|
parser.add_argument('url')
|
||||||
|
args = parser.parse_args()
|
||||||
|
messages = [ system_message(args.sys_prompt) ] if args.sys_prompt else []
|
||||||
|
messages.append(user_message(args.prompt, filepath=args.file))
|
||||||
|
|
||||||
|
d = {
|
||||||
|
'model': args.model,
|
||||||
|
'stream': True,
|
||||||
|
'messages': messages
|
||||||
|
}
|
||||||
|
hc = StreamHttpClient()
|
||||||
|
headers = {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
i = 0
|
||||||
|
buffer = ''
|
||||||
|
reco = hc('POST', args.url, headers=headers, data=json.dumps(d))
|
||||||
|
async for chunk in liner(reco):
|
||||||
|
chunk = chunk[6:]
|
||||||
|
if chunk != '[DONE]':
|
||||||
|
try:
|
||||||
|
f = json.loads(chunk)
|
||||||
|
except Exception as e:
|
||||||
|
print(f'****{chunk=} error {e} {format_exc()}')
|
||||||
|
continue
|
||||||
|
if not f['choices'][0]['finish_reason']:
|
||||||
|
print(f['choices'][0]['delta']['content'], end='', flush=True)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
print('\n\n')
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
MyLogger('null', levelname='error', logfile='/dev/null')
|
||||||
|
asyncio.new_event_loop().run_until_complete(main())
|
||||||
649
llmengine/connection.py
Normal file
649
llmengine/connection.py
Normal file
@ -0,0 +1,649 @@
|
|||||||
|
import milvus_connection
|
||||||
|
from traceback import format_exc
|
||||||
|
import argparse
|
||||||
|
from aiohttp import web
|
||||||
|
from llmengine.base_connection import get_connection_class
|
||||||
|
from appPublic.registerfunction import RegisterFunction
|
||||||
|
from appPublic.log import debug, error, info
|
||||||
|
from ahserver.serverenv import ServerEnv
|
||||||
|
from ahserver.webapp import webserver
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
|
||||||
|
helptext = """Milvus Connection Service API (using pymilvus Collection API):
|
||||||
|
|
||||||
|
1. Create Collection Endpoint:
|
||||||
|
path: /v1/createcollection
|
||||||
|
method: POST
|
||||||
|
headers: {"Content-Type": "application/json"}
|
||||||
|
data: {
|
||||||
|
"db_type": "textdb" // 可选,若不提供则使用默认集合 ragdb
|
||||||
|
}
|
||||||
|
response:
|
||||||
|
- Success: HTTP 200, {"status": "success", "collection_name": "ragdb" or "ragdb_textdb", "message": "集合 ragdb 或 ragdb_textdb 创建成功"}
|
||||||
|
- Error: HTTP 400, {"status": "error", "collection_name": "ragdb" or "ragdb_textdb", "message": "<error message>"}
|
||||||
|
|
||||||
|
2. Delete Collection Endpoint:
|
||||||
|
path: /v1/deletecollection
|
||||||
|
method: POST
|
||||||
|
headers: {"Content-Type": "application/json"}
|
||||||
|
data: {
|
||||||
|
"db_type": "textdb" // 可选,若不提供则删除默认集合 ragdb
|
||||||
|
}
|
||||||
|
response:
|
||||||
|
- Success: HTTP 200, {"status": "success", "collection_name": "ragdb" or "ragdb_textdb", "message": "集合 ragdb 或 ragdb_textdb 删除成功"}
|
||||||
|
- Success (collection does not exist): HTTP 200, {"status": "success", "collection_name": "ragdb" or "ragdb_textdb", "message": "集合 ragdb 或 ragdb_textdb 不存在,无需删除"}
|
||||||
|
- Error: HTTP 400, {"status": "error", "collection_name": "ragdb" or "ragdb_textdb", "message": "<error message>"}
|
||||||
|
|
||||||
|
3. Insert File Endpoint:
|
||||||
|
path: /v1/insertfile
|
||||||
|
method: POST
|
||||||
|
headers: {"Content-Type": "application/json"}
|
||||||
|
data: {
|
||||||
|
"file_path": "/path/to/file.txt", // 必填,文件路径
|
||||||
|
"userid": "user123", // 必填,用户 ID
|
||||||
|
"db_type": "textdb", // 可选,若不提供则使用默认集合 ragdb
|
||||||
|
"knowledge_base_id": "kb123" // 必填,知识库 ID
|
||||||
|
}
|
||||||
|
response:
|
||||||
|
- Success: HTTP 200, {"status": "success", "document_id": "<uuid>", "collection_name": "ragdb" or "ragdb_textdb", "message": "文件 <file_path> 成功嵌入并处理三元组", "status_code": 200}
|
||||||
|
- Success (triples failed): HTTP 200, {"status": "success", "document_id": "<uuid>", "collection_name": "ragdb" or "ragdb_textdb", "message": "文件 <file_path> 成功嵌入,但三元组处理失败: <error>", "status_code": 200}
|
||||||
|
- Error: HTTP 400, {"status": "error", "document_id": "", "collection_name": "ragdb" or "ragdb_textdb", "message": "<error message>", "status_code": 400}
|
||||||
|
|
||||||
|
4. Delete Document Endpoint:
|
||||||
|
path: /v1/deletefile
|
||||||
|
method: POST
|
||||||
|
headers: {"Content-Type": "application/json"}
|
||||||
|
data: {
|
||||||
|
"userid": "user123", // 必填,用户 ID
|
||||||
|
"filename": "file.txt", // 必填,文件名
|
||||||
|
"db_type": "textdb", // 可选,若不提供则使用默认集合 ragdb
|
||||||
|
"knowledge_base_id": "kb123" // 必填,知识库 ID
|
||||||
|
}
|
||||||
|
response:
|
||||||
|
- Success: HTTP 200, {"status": "success", "document_id": "<uuid1,uuid2>", "collection_name": "ragdb" or "ragdb_textdb", "message": "成功删除 <count> 条 Milvus 记录,<nodes> 个 Neo4j 节点,<rels> 个 Neo4j 关系,userid=<userid>, filename=<filename>", "status_code": 200}
|
||||||
|
- Success (no records): HTTP 200, {"status": "success", "document_id": "", "collection_name": "ragdb" or "ragdb_textdb", "message": "没有找到 userid=<userid>, filename=<filename>, knowledge_base_id=<knowledge_base_id> 的记录,无需删除", "status_code": 200}
|
||||||
|
- Success (collection missing): HTTP 200, {"status": "success", "document_id": "", "collection_name": "ragdb" or "ragdb_textdb", "message": "集合 <collection_name> 不存在,无需删除", "status_code": 200}
|
||||||
|
- Error: HTTP 400, {"status": "error", "document_id": "", "collection_name": "ragdb" or "ragdb_textdb", "message": "<error message>", "status_code": 400}
|
||||||
|
|
||||||
|
5. Fused Search Query Endpoint:
|
||||||
|
path: /v1/fusedsearchquery
|
||||||
|
method: POST
|
||||||
|
headers: {"Content-Type": "application/json"}
|
||||||
|
data: {
|
||||||
|
"query": "苹果公司在北京开设新店",
|
||||||
|
"userid": "user1",
|
||||||
|
"db_type": "textdb", // 可选,若不提供则使用默认集合 ragdb
|
||||||
|
"knowledge_base_ids": ["kb123"],
|
||||||
|
"limit": 5,
|
||||||
|
"offset": 0,
|
||||||
|
"use_rerank": true
|
||||||
|
}
|
||||||
|
response:
|
||||||
|
- Success: HTTP 200, {
|
||||||
|
"status": "success",
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"text": "<完整文本内容>",
|
||||||
|
"distance": 0.95,
|
||||||
|
"source": "fused_query_with_triplets",
|
||||||
|
"rerank_score": 0.92, // 若 use_rerank=true
|
||||||
|
"metadata": {
|
||||||
|
"userid": "user1",
|
||||||
|
"document_id": "<uuid>",
|
||||||
|
"filename": "file.txt",
|
||||||
|
"file_path": "/path/to/file.txt",
|
||||||
|
"upload_time": "<iso_timestamp>",
|
||||||
|
"file_type": "txt"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
...
|
||||||
|
],
|
||||||
|
"timing": {
|
||||||
|
"collection_load": <float>, // 集合加载耗时(秒)
|
||||||
|
"entity_extraction": <float>, // 实体提取耗时(秒)
|
||||||
|
"triplet_matching": <float>, // 三元组匹配耗时(秒)
|
||||||
|
"triplet_text_combine": <float>, // 拼接三元组文本耗时(秒)
|
||||||
|
"embedding_generation": <float>, // 嵌入向量生成耗时(秒)
|
||||||
|
"vector_search": <float>, // 向量搜索耗时(秒)
|
||||||
|
"deduplication": <float>, // 去重耗时(秒)
|
||||||
|
"reranking": <float>, // 重排序耗时(秒,若 use_rerank=true)
|
||||||
|
"total_time": <float> // 总耗时(秒)
|
||||||
|
},
|
||||||
|
"collection_name": "ragdb" or "ragdb_textdb"
|
||||||
|
}
|
||||||
|
- Error: HTTP 400, {
|
||||||
|
"status": "error",
|
||||||
|
"message": "<error message>",
|
||||||
|
"collection_name": "ragdb" or "ragdb_textdb"
|
||||||
|
}
|
||||||
|
6. Search Query Endpoint:
|
||||||
|
path: /v1/searchquery
|
||||||
|
method: POST
|
||||||
|
headers: {"Content-Type": "application/json"}
|
||||||
|
data: {
|
||||||
|
"query": "知识图谱的知识融合是什么?",
|
||||||
|
"userid": "user1",
|
||||||
|
"db_type": "textdb", // 可选,若不提供则使用默认集合 ragdb
|
||||||
|
"knowledge_base_ids": ["kb123"],
|
||||||
|
"limit": 5,
|
||||||
|
"offset": 0,
|
||||||
|
"use_rerank": true
|
||||||
|
}
|
||||||
|
response:
|
||||||
|
- Success: HTTP 200, {
|
||||||
|
"status": "success",
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"text": "<完整文本内容>",
|
||||||
|
"distance": 0.95,
|
||||||
|
"source": "vector_query",
|
||||||
|
"rerank_score": 0.92, // 若 use_rerank=true
|
||||||
|
"metadata": {
|
||||||
|
"userid": "user1",
|
||||||
|
"document_id": "<uuid>",
|
||||||
|
"filename": "file.txt",
|
||||||
|
"file_path": "/path/to/file.txt",
|
||||||
|
"upload_time": "<iso_timestamp>",
|
||||||
|
"file_type": "txt"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
...
|
||||||
|
],
|
||||||
|
"timing": {
|
||||||
|
"collection_load": <float>, // 集合加载耗时(秒)
|
||||||
|
"embedding_generation": <float>, // 嵌入向量生成耗时(秒)
|
||||||
|
"vector_search": <float>, // 向量搜索耗时(秒)
|
||||||
|
"deduplication": <float>, // 去重耗时(秒)
|
||||||
|
"reranking": <float>, // 重排序耗时(秒,若 use_rerank=true)
|
||||||
|
"total_time": <float> // 总耗时(秒)
|
||||||
|
},
|
||||||
|
"collection_name": "ragdb" or "ragdb_textdb"
|
||||||
|
}
|
||||||
|
- Error: HTTP 400, {
|
||||||
|
"status": "error",
|
||||||
|
"message": "<error message>",
|
||||||
|
"collection_name": "ragdb" or "ragdb_textdb"
|
||||||
|
}
|
||||||
|
|
||||||
|
7. List User Files Endpoint:
|
||||||
|
path: /v1/listuserfiles
|
||||||
|
method: POST
|
||||||
|
headers: {"Content-Type": "application/json"}
|
||||||
|
data: {
|
||||||
|
"userid": "user1",
|
||||||
|
"db_type": "textdb" // 可选,若不提供则使用默认集合 ragdb
|
||||||
|
}
|
||||||
|
response:
|
||||||
|
- Success: HTTP 200, {
|
||||||
|
"status": "success",
|
||||||
|
"files_by_knowledge_base": {
|
||||||
|
"kb123": [
|
||||||
|
{
|
||||||
|
"document_id": "<uuid>",
|
||||||
|
"filename": "file1.txt",
|
||||||
|
"file_path": "/path/to/file1.txt",
|
||||||
|
"upload_time": "<iso_timestamp>",
|
||||||
|
"file_type": "txt",
|
||||||
|
"knowledge_base_id": "kb123"
|
||||||
|
},
|
||||||
|
...
|
||||||
|
],
|
||||||
|
"kb456": [
|
||||||
|
{
|
||||||
|
"document_id": "<uuid>",
|
||||||
|
"filename": "file2.pdf",
|
||||||
|
"file_path": "/path/to/file2.pdf",
|
||||||
|
"upload_time": "<iso_timestamp>",
|
||||||
|
"file_type": "pdf",
|
||||||
|
"knowledge_base_id": "kb456"
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"collection_name": "ragdb" or "ragdb_textdb"
|
||||||
|
}
|
||||||
|
- Error: HTTP 400, {
|
||||||
|
"status": "error",
|
||||||
|
"message": "<error message>",
|
||||||
|
"collection_name": "ragdb" or "ragdb_textdb"
|
||||||
|
}
|
||||||
|
8. Connection Endpoint (for compatibility):
|
||||||
|
path: /v1/connection
|
||||||
|
method: POST
|
||||||
|
headers: {"Content-Type": "application/json"}
|
||||||
|
data: {
|
||||||
|
"action": "<initialize|get_params|create_collection|delete_collection|insert_document|delete_document|fused_search|search_query|list_user_files>",
|
||||||
|
"params": {...}
|
||||||
|
}
|
||||||
|
response:
|
||||||
|
- Success: HTTP 200, {"status": "success", ...}
|
||||||
|
- Error: HTTP 400, {"status": "error", "message": "<error message>"}
|
||||||
|
|
||||||
|
9. Docs Endpoint:
|
||||||
|
path: /docs
|
||||||
|
method: GET
|
||||||
|
response: This help text
|
||||||
|
|
||||||
|
10. Delete Knowledge Base Endpoint:
|
||||||
|
path: /v1/deleteknowledgebase
|
||||||
|
method: POST
|
||||||
|
headers: {"Content-Type": "application/json"}
|
||||||
|
data: {
|
||||||
|
"userid": "user123", // 必填,用户 ID
|
||||||
|
"knowledge_base_id": "kb123",// 必填,知识库 ID
|
||||||
|
"db_type": "textdb" // 可选,若不提供则使用默认集合 ragdb
|
||||||
|
}
|
||||||
|
response:
|
||||||
|
- Success: HTTP 200, {"status": "success", "document_id": "<uuid1,uuid2>", "filename": "<filename1,filename2>", "collection_name": "ragdb" or "ragdb_textdb", "message": "成功删除 <count> 条 Milvus 记录,<nodes> 个 Neo4j 节点,<rels> 个 Neo4j 关系,userid=<userid>, knowledge_base_id=<knowledge_base_id>", "status_code": 200}
|
||||||
|
- Success (no records): HTTP 200, {"status": "success", "document_id": "", "filename": "", "collection_name": "ragdb" or "ragdb_textdb", "message": "没有找到 userid=<userid>, knowledge_base_id=<knowledge_base_id> 的记录,无需删除", "status_code": 200}
|
||||||
|
- Success (collection missing): HTTP 200, {"status": "success", "document_id": "", "filename": "", "collection_name": "ragdb" or "ragdb_textdb", "message": "集合 <collection_name> 不存在,无需删除", "status_code": 200}
|
||||||
|
- Error: HTTP 400, {"status": "error", "document_id": "", "filename": "", "collection_name": "ragdb" or "ragdb_textdb", "message": "<error message>", "status_code": 400}
|
||||||
|
|
||||||
|
10. List All Knowledge Bases Endpoint:
|
||||||
|
path: /v1/listallknowledgebases
|
||||||
|
method: POST
|
||||||
|
headers: {"Content-Type": "application/json"}
|
||||||
|
data: {
|
||||||
|
"db_type": "textdb" // 可选,若不提供则使用默认集合 ragdb
|
||||||
|
}
|
||||||
|
response:
|
||||||
|
- Success: HTTP 200, {
|
||||||
|
"status": "success",
|
||||||
|
"users_knowledge_bases": {
|
||||||
|
"user1": {
|
||||||
|
"kb123": [
|
||||||
|
{
|
||||||
|
"document_id": "<uuid>",
|
||||||
|
"filename": "file1.txt",
|
||||||
|
"file_path": "/path/to/file1.txt",
|
||||||
|
"upload_time": "<iso_timestamp>",
|
||||||
|
"file_type": "txt",
|
||||||
|
"knowledge_base_id": "kb123"
|
||||||
|
},
|
||||||
|
...
|
||||||
|
],
|
||||||
|
"kb456": [
|
||||||
|
{
|
||||||
|
"document_id": "<uuid>",
|
||||||
|
"filename": "file2.pdf",
|
||||||
|
"file_path": "/path/to/file2.pdf",
|
||||||
|
"upload_time": "<iso_timestamp>",
|
||||||
|
"file_type": "pdf",
|
||||||
|
"knowledge_base_id": "kb456"
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"user2": {...}
|
||||||
|
},
|
||||||
|
"collection_name": "ragdb" or "ragdb_textdb",
|
||||||
|
"message": "成功列出 <count> 个用户的知识库和文件",
|
||||||
|
"status_code": 200
|
||||||
|
}
|
||||||
|
- Error: HTTP 400, {
|
||||||
|
"status": "error",
|
||||||
|
"users_knowledge_bases": {},
|
||||||
|
"collection_name": "ragdb" or "ragdb_textdb",
|
||||||
|
"message": "<error message>",
|
||||||
|
"status_code": 400
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
def init():
|
||||||
|
rf = RegisterFunction()
|
||||||
|
rf.register('createcollection', create_collection)
|
||||||
|
rf.register('deletecollection', delete_collection)
|
||||||
|
rf.register('insertfile', insert_file)
|
||||||
|
rf.register('deletefile', delete_file)
|
||||||
|
rf.register('deleteknowledgebase', delete_knowledge_base)
|
||||||
|
rf.register('fusedsearchquery', fused_search_query)
|
||||||
|
rf.register('searchquery', search_query)
|
||||||
|
rf.register('listuserfiles', list_user_files)
|
||||||
|
rf.register('listallknowledgebases', list_all_knowledge_bases)
|
||||||
|
rf.register('connection', handle_connection)
|
||||||
|
rf.register('docs', docs)
|
||||||
|
|
||||||
|
async def docs(request, params_kw, *params, **kw):
|
||||||
|
return web.Response(text=helptext, content_type='text/plain')
|
||||||
|
|
||||||
|
async def not_implemented(request, params_kw, *params, **kw):
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"message": "功能尚未实现"
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=501)
|
||||||
|
|
||||||
|
async def create_collection(request, params_kw, *params, **kw):
|
||||||
|
debug(f'{params_kw=}')
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
db_type = params_kw.get('db_type', '')
|
||||||
|
collection_name = "ragdb" if not db_type else f"ragdb_{db_type}"
|
||||||
|
try:
|
||||||
|
result = await engine.handle_connection("create_collection", {"db_type": db_type})
|
||||||
|
debug(f'{result=}')
|
||||||
|
return web.json_response(result, dumps=lambda obj: json.dumps(obj, ensure_ascii=False))
|
||||||
|
except Exception as e:
|
||||||
|
error(f'创建集合失败: {str(e)}')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"collection_name": collection_name,
|
||||||
|
"message": str(e)
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
|
||||||
|
async def delete_collection(request, params_kw, *params, **kw):
|
||||||
|
debug(f'{params_kw=}')
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
db_type = params_kw.get('db_type', '')
|
||||||
|
collection_name = "ragdb" if not db_type else f"ragdb_{db_type}"
|
||||||
|
try:
|
||||||
|
result = await engine.handle_connection("delete_collection", {"db_type": db_type})
|
||||||
|
debug(f'{result=}')
|
||||||
|
return web.json_response(result, dumps=lambda obj: json.dumps(obj, ensure_ascii=False))
|
||||||
|
except Exception as e:
|
||||||
|
error(f'删除集合失败: {str(e)}')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"collection_name": collection_name,
|
||||||
|
"message": str(e)
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
|
||||||
|
async def insert_file(request, params_kw, *params, **kw):
|
||||||
|
debug(f'Received params: {params_kw=}')
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
file_path = params_kw.get('file_path', '')
|
||||||
|
userid = params_kw.get('userid', '')
|
||||||
|
db_type = params_kw.get('db_type', '')
|
||||||
|
knowledge_base_id = params_kw.get('knowledge_base_id', '')
|
||||||
|
collection_name = "ragdb" if not db_type else f"ragdb_{db_type}"
|
||||||
|
try:
|
||||||
|
required_fields = ['file_path', 'userid', 'knowledge_base_id']
|
||||||
|
missing_fields = [field for field in required_fields if field not in params_kw or not params_kw[field]]
|
||||||
|
if missing_fields:
|
||||||
|
raise ValueError(f"缺少必填字段: {', '.join(missing_fields)}")
|
||||||
|
|
||||||
|
debug(
|
||||||
|
f'Calling insert_document with: file_path={file_path}, userid={userid}, db_type={db_type}, knowledge_base_id={knowledge_base_id}')
|
||||||
|
result = await engine.handle_connection("insert_document", {
|
||||||
|
"file_path": file_path,
|
||||||
|
"userid": userid,
|
||||||
|
"db_type": db_type,
|
||||||
|
"knowledge_base_id": knowledge_base_id
|
||||||
|
})
|
||||||
|
debug(f'Insert result: {result=}')
|
||||||
|
status = 200 if result.get("status") == "success" else 400
|
||||||
|
return web.json_response(result, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=status)
|
||||||
|
except Exception as e:
|
||||||
|
error(f'插入文件失败: {str(e)}')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"collection_name": collection_name,
|
||||||
|
"document_id": "",
|
||||||
|
"message": str(e)
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
|
||||||
|
async def delete_file(request, params_kw, *params, **kw):
|
||||||
|
debug(f'Received delete_file params: {params_kw=}')
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
userid = params_kw.get('userid', '')
|
||||||
|
filename = params_kw.get('filename', '')
|
||||||
|
db_type = params_kw.get('db_type', '')
|
||||||
|
knowledge_base_id = params_kw.get('knowledge_base_id', '')
|
||||||
|
collection_name = "ragdb" if not db_type else f"ragdb_{db_type}"
|
||||||
|
try:
|
||||||
|
required_fields = ['userid', 'filename', 'knowledge_base_id']
|
||||||
|
missing_fields = [field for field in required_fields if field not in params_kw or not params_kw[field]]
|
||||||
|
if missing_fields:
|
||||||
|
raise ValueError(f"缺少必填字段: {', '.join(missing_fields)}")
|
||||||
|
|
||||||
|
debug(f'Calling delete_document with: userid={userid}, filename={filename}, db_type={db_type}, knowledge_base_id={knowledge_base_id}')
|
||||||
|
result = await engine.handle_connection("delete_document", {
|
||||||
|
"userid": userid,
|
||||||
|
"filename": filename,
|
||||||
|
"db_type": db_type,
|
||||||
|
"knowledge_base_id": knowledge_base_id
|
||||||
|
})
|
||||||
|
debug(f'Delete result: {result=}')
|
||||||
|
status = 200 if result.get("status") == "success" else 400
|
||||||
|
return web.json_response(result, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=status)
|
||||||
|
except Exception as e:
|
||||||
|
error(f'删除文件失败: {str(e)}')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"collection_name": collection_name,
|
||||||
|
"document_id": "",
|
||||||
|
"message": str(e),
|
||||||
|
"status_code": 400
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
|
||||||
|
async def delete_knowledge_base(request, params_kw, *params, **kw):
|
||||||
|
debug(f'Received delete_knowledge_base params: {params_kw=}')
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
userid = params_kw.get('userid', '')
|
||||||
|
knowledge_base_id = params_kw.get('knowledge_base_id', '')
|
||||||
|
db_type = params_kw.get('db_type', '')
|
||||||
|
collection_name = "ragdb" if not db_type else f"ragdb_{db_type}"
|
||||||
|
try:
|
||||||
|
required_fields = ['userid', 'knowledge_base_id']
|
||||||
|
missing_fields = [field for field in required_fields if field not in params_kw or not params_kw[field]]
|
||||||
|
if missing_fields:
|
||||||
|
raise ValueError(f"缺少必填字段: {', '.join(missing_fields)}")
|
||||||
|
|
||||||
|
debug(
|
||||||
|
f'Calling delete_knowledge_base with: userid={userid}, knowledge_base_id={knowledge_base_id}, db_type={db_type}')
|
||||||
|
result = await engine.handle_connection("delete_knowledge_base", {
|
||||||
|
"userid": userid,
|
||||||
|
"knowledge_base_id": knowledge_base_id,
|
||||||
|
"db_type": db_type
|
||||||
|
})
|
||||||
|
debug(f'Delete knowledge base result: {result=}')
|
||||||
|
status = 200 if result.get("status") == "success" else 400
|
||||||
|
return web.json_response(result, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=status)
|
||||||
|
except Exception as e:
|
||||||
|
error(f'删除知识库失败: {str(e)}')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"collection_name": collection_name,
|
||||||
|
"document_id": "",
|
||||||
|
"filename": "",
|
||||||
|
"message": str(e),
|
||||||
|
"status_code": 400
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
|
||||||
|
async def fused_search_query(request, params_kw, *params, **kw):
|
||||||
|
debug(f'{params_kw=}')
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
query = params_kw.get('query')
|
||||||
|
userid = params_kw.get('userid')
|
||||||
|
db_type = params_kw.get('db_type', '')
|
||||||
|
knowledge_base_ids = params_kw.get('knowledge_base_ids')
|
||||||
|
limit = params_kw.get('limit')
|
||||||
|
offset = params_kw.get('offset', 0)
|
||||||
|
use_rerank = params_kw.get('use_rerank', True)
|
||||||
|
collection_name = "ragdb" if not db_type else f"ragdb_{db_type}"
|
||||||
|
try:
|
||||||
|
if not all([query, userid, knowledge_base_ids]):
|
||||||
|
debug(f'query, userid 或 knowledge_base_ids 未提供')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"message": "query, userid 或 knowledge_base_ids 未提供",
|
||||||
|
"collection_name": collection_name
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
result = await engine.handle_connection("fused_search", {
|
||||||
|
"query": query,
|
||||||
|
"userid": userid,
|
||||||
|
"db_type": db_type,
|
||||||
|
"knowledge_base_ids": knowledge_base_ids,
|
||||||
|
"limit": limit,
|
||||||
|
"offset": offset,
|
||||||
|
"use_rerank": use_rerank
|
||||||
|
})
|
||||||
|
debug(f'{result=}')
|
||||||
|
response = {
|
||||||
|
"status": "success",
|
||||||
|
"results": result.get("results", []),
|
||||||
|
"timing": result.get("timing", {}),
|
||||||
|
"collection_name": collection_name
|
||||||
|
}
|
||||||
|
return web.json_response(response, dumps=lambda obj: json.dumps(obj, ensure_ascii=False))
|
||||||
|
except Exception as e:
|
||||||
|
error(f'融合搜索失败: {str(e)}')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"message": str(e),
|
||||||
|
"collection_name": collection_name
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
|
||||||
|
async def search_query(request, params_kw, *params, **kw):
|
||||||
|
debug(f'{params_kw=}')
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
query = params_kw.get('query')
|
||||||
|
userid = params_kw.get('userid')
|
||||||
|
db_type = params_kw.get('db_type', '')
|
||||||
|
knowledge_base_ids = params_kw.get('knowledge_base_ids')
|
||||||
|
limit = params_kw.get('limit')
|
||||||
|
offset = params_kw.get('offset', 0)
|
||||||
|
use_rerank = params_kw.get('use_rerank', True)
|
||||||
|
collection_name = "ragdb" if not db_type else f"ragdb_{db_type}"
|
||||||
|
try:
|
||||||
|
if not all([query, userid, knowledge_base_ids]):
|
||||||
|
debug(f'query, userid 或 knowledge_base_ids 未提供')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"message": "query, userid 或 knowledge_base_ids 未提供",
|
||||||
|
"collection_name": collection_name
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
result = await engine.handle_connection("search_query", {
|
||||||
|
"query": query,
|
||||||
|
"userid": userid,
|
||||||
|
"db_type": db_type,
|
||||||
|
"knowledge_base_ids": knowledge_base_ids,
|
||||||
|
"limit": limit,
|
||||||
|
"offset": offset,
|
||||||
|
"use_rerank": use_rerank
|
||||||
|
})
|
||||||
|
debug(f'{result=}')
|
||||||
|
response = {
|
||||||
|
"status": "success",
|
||||||
|
"results": result.get("results", []),
|
||||||
|
"timing": result.get("timing", {}),
|
||||||
|
"collection_name": collection_name
|
||||||
|
}
|
||||||
|
return web.json_response(response, dumps=lambda obj: json.dumps(obj, ensure_ascii=False))
|
||||||
|
except Exception as e:
|
||||||
|
error(f'纯向量搜索失败: {str(e)}')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"message": str(e),
|
||||||
|
"collection_name": collection_name
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
|
||||||
|
async def list_user_files(request, params_kw, *params, **kw):
|
||||||
|
debug(f'{params_kw=}')
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
userid = params_kw.get('userid')
|
||||||
|
db_type = params_kw.get('db_type', '')
|
||||||
|
collection_name = "ragdb" if not db_type else f"ragdb_{db_type}"
|
||||||
|
try:
|
||||||
|
if not userid:
|
||||||
|
debug(f'userid 未提供')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"message": "userid 未提供",
|
||||||
|
"collection_name": collection_name
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
result = await engine.handle_connection("list_user_files", {
|
||||||
|
"userid": userid,
|
||||||
|
"db_type": db_type
|
||||||
|
})
|
||||||
|
debug(f'{result=}')
|
||||||
|
response = {
|
||||||
|
"status": "success",
|
||||||
|
"files_by_knowledge_base": result,
|
||||||
|
"collection_name": collection_name
|
||||||
|
}
|
||||||
|
return web.json_response(response, dumps=lambda obj: json.dumps(obj, ensure_ascii=False))
|
||||||
|
except Exception as e:
|
||||||
|
error(f'列出用户文件失败: {str(e)}')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"message": str(e),
|
||||||
|
"collection_name": collection_name
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
|
||||||
|
async def list_all_knowledge_bases(request, params_kw, *params, **kw):
|
||||||
|
debug(f'{params_kw=}')
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
db_type = params_kw.get('db_type', '')
|
||||||
|
collection_name = "ragdb" if not db_type else f"ragdb_{db_type}"
|
||||||
|
try:
|
||||||
|
result = await engine.handle_connection("list_all_knowledge_bases", {
|
||||||
|
"db_type": db_type
|
||||||
|
})
|
||||||
|
debug(f'{result=}')
|
||||||
|
response = {
|
||||||
|
"status": result.get("status", "success"),
|
||||||
|
"users_knowledge_bases": result.get("users_knowledge_bases", {}),
|
||||||
|
"collection_name": collection_name,
|
||||||
|
"message": result.get("message", ""),
|
||||||
|
"status_code": result.get("status_code", 200)
|
||||||
|
}
|
||||||
|
return web.json_response(response, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=response["status_code"])
|
||||||
|
except Exception as e:
|
||||||
|
error(f'列出所有用户知识库失败: {str(e)}')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"users_knowledge_bases": {},
|
||||||
|
"collection_name": collection_name,
|
||||||
|
"message": str(e),
|
||||||
|
"status_code": 400
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
|
||||||
|
async def handle_connection(request, params_kw, *params, **kw):
|
||||||
|
debug(f'{params_kw=}')
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
try:
|
||||||
|
data = await request.json()
|
||||||
|
action = data.get('action')
|
||||||
|
if not action:
|
||||||
|
debug(f'action 未提供')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"message": "action 参数未提供"
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
result = await engine.handle_connection(action, data.get('params', {}))
|
||||||
|
debug(f'{result=}')
|
||||||
|
return web.json_response(result, dumps=lambda obj: json.dumps(obj, ensure_ascii=False))
|
||||||
|
except Exception as e:
|
||||||
|
error(f'处理连接操作失败: {str(e)}')
|
||||||
|
return web.json_response({
|
||||||
|
"status": "error",
|
||||||
|
"message": str(e)
|
||||||
|
}, dumps=lambda obj: json.dumps(obj, ensure_ascii=False), status=400)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(prog="Milvus Connection Service")
|
||||||
|
parser.add_argument('-w', '--workdir')
|
||||||
|
parser.add_argument('-p', '--port', default='8888')
|
||||||
|
parser.add_argument('connection_path')
|
||||||
|
args = parser.parse_args()
|
||||||
|
debug(f"Arguments: {args}")
|
||||||
|
Klass = get_connection_class(args.connection_path)
|
||||||
|
se = ServerEnv()
|
||||||
|
se.engine = Klass()
|
||||||
|
workdir = args.workdir or os.getcwd()
|
||||||
|
port = args.port
|
||||||
|
debug(f'{args=}')
|
||||||
|
webserver(init, workdir, port)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
87
llmengine/entity.py
Normal file
87
llmengine/entity.py
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
from traceback import format_exc
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import argparse
|
||||||
|
from llmengine.ltpentity import *
|
||||||
|
from llmengine.base_entity import get_ltp_class
|
||||||
|
from typing import List
|
||||||
|
|
||||||
|
from appPublic.registerfunction import RegisterFunction
|
||||||
|
from appPublic.worker import awaitify
|
||||||
|
from appPublic.log import debug, exception
|
||||||
|
from ahserver.serverenv import ServerEnv
|
||||||
|
from ahserver.globalEnv import stream_response
|
||||||
|
from ahserver.webapp import webserver
|
||||||
|
|
||||||
|
from aiohttp_session import get_session
|
||||||
|
|
||||||
|
helptext = """LTP Entities API:
|
||||||
|
|
||||||
|
1. Entities Endpoint:
|
||||||
|
path: /v1/entities
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
data: {
|
||||||
|
"query": "苹果公司在北京开设新店"
|
||||||
|
}
|
||||||
|
response: {
|
||||||
|
"object": "list",
|
||||||
|
"data": [
|
||||||
|
"苹果公司",
|
||||||
|
"北京",
|
||||||
|
"新店",
|
||||||
|
"开设",
|
||||||
|
...
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
2. Docs Endpoint:
|
||||||
|
path: /v1/docs
|
||||||
|
response: This help text
|
||||||
|
"""
|
||||||
|
|
||||||
|
def init():
|
||||||
|
rf = RegisterFunction()
|
||||||
|
rf.register('entities', entities)
|
||||||
|
rf.register('docs', docs)
|
||||||
|
debug("注册路由: entities, docs")
|
||||||
|
|
||||||
|
async def docs(request, params_kw, *params, **kw):
|
||||||
|
return helptext
|
||||||
|
|
||||||
|
async def entities(request, params_kw, *params, **kw):
|
||||||
|
debug(f'{params_kw.query=}')
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
query = params_kw.query
|
||||||
|
if query is None:
|
||||||
|
e = exception(f'query is None')
|
||||||
|
raise e
|
||||||
|
entities = await engine.extract_entities(query)
|
||||||
|
debug(f'{entities=}, type(entities)')
|
||||||
|
return {
|
||||||
|
"object": "list",
|
||||||
|
"data": entities
|
||||||
|
}
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(prog="LTP Entity Service")
|
||||||
|
parser.add_argument('-w', '--workdir')
|
||||||
|
parser.add_argument('-p', '--port')
|
||||||
|
parser.add_argument('model_path')
|
||||||
|
args = parser.parse_args()
|
||||||
|
Klass = get_ltp_class(args.model_path)
|
||||||
|
if Klass is None:
|
||||||
|
e = Exception(f'{args.model_path} has not mapping to a model class')
|
||||||
|
exception(f'{e}, {format_exc()}')
|
||||||
|
raise e
|
||||||
|
se = ServerEnv()
|
||||||
|
se.engine = Klass(args.model_path)
|
||||||
|
workdir = args.workdir or os.getcwd()
|
||||||
|
port = args.port
|
||||||
|
debug(f'{args=}')
|
||||||
|
webserver(init, workdir, port)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
197
llmengine/kgc.py
Normal file
197
llmengine/kgc.py
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
import os
|
||||||
|
import re
|
||||||
|
from py2neo import Graph, Node, Relationship
|
||||||
|
from typing import Set, List, Dict, Tuple
|
||||||
|
from appPublic.jsonConfig import getConfig
|
||||||
|
from appPublic.log import debug, error, info
|
||||||
|
|
||||||
|
|
||||||
|
class KnowledgeGraph:
|
||||||
|
def __init__(self, triples: List[Dict], document_id: str, knowledge_base_id: str, userid: str):
|
||||||
|
self.triples = triples
|
||||||
|
self.document_id = document_id
|
||||||
|
self.knowledge_base_id = knowledge_base_id
|
||||||
|
self.userid = userid
|
||||||
|
config = getConfig()
|
||||||
|
self.neo4j_uri = config['neo4j']['uri']
|
||||||
|
self.neo4j_user = config['neo4j']['user']
|
||||||
|
self.neo4j_password = config['neo4j']['password']
|
||||||
|
self.g = Graph(self.neo4j_uri, auth=(self.neo4j_user, self.neo4j_password))
|
||||||
|
info(f"开始构建知识图谱,document_id: {self.document_id}, knowledge_base_id: {self.knowledge_base_id}, userid: {self.userid}, 三元组数量: {len(triples)}")
|
||||||
|
|
||||||
|
def _normalize_label(self, entity_type: str) -> str:
|
||||||
|
"""规范化实体类型为 Neo4j 标签"""
|
||||||
|
if not entity_type or not entity_type.strip():
|
||||||
|
return 'Entity'
|
||||||
|
entity_type = re.sub(r'[^\w\s]', '', entity_type.strip())
|
||||||
|
words = entity_type.split()
|
||||||
|
label = '_'.join(word.capitalize() for word in words if word)
|
||||||
|
return label or 'Entity'
|
||||||
|
|
||||||
|
def _clean_relation(self, relation: str) -> Tuple[str, str]:
|
||||||
|
"""清洗关系,返回 (rel_type, rel_name),确保 rel_type 合法"""
|
||||||
|
relation = relation.strip()
|
||||||
|
if not relation:
|
||||||
|
return 'RELATED_TO', '相关'
|
||||||
|
|
||||||
|
cleaned_relation = re.sub(r'[^\w\s]', '', relation).strip()
|
||||||
|
if not cleaned_relation:
|
||||||
|
return 'RELATED_TO', '相关'
|
||||||
|
|
||||||
|
if 'instance of' in relation.lower():
|
||||||
|
return 'INSTANCE_OF', '实例'
|
||||||
|
elif 'subclass of' in relation.lower():
|
||||||
|
return 'SUBCLASS_OF', '子类'
|
||||||
|
elif 'part of' in relation.lower():
|
||||||
|
return 'PART_OF', '部分'
|
||||||
|
|
||||||
|
rel_type = re.sub(r'\s+', '_', cleaned_relation).upper()
|
||||||
|
if rel_type and rel_type[0].isdigit():
|
||||||
|
rel_type = f'REL_{rel_type}'
|
||||||
|
if not re.match(r'^[A-Za-z][A-Za-z0-9_]*$', rel_type):
|
||||||
|
debug(f"非法关系类型 '{rel_type}',替换为 'RELATED_TO'")
|
||||||
|
return 'RELATED_TO', relation
|
||||||
|
return rel_type, relation
|
||||||
|
|
||||||
|
def read_nodes(self) -> Tuple[Dict[str, Set], Dict[str, List], List[Dict]]:
|
||||||
|
"""从三元组列表中读取节点和关系"""
|
||||||
|
nodes_by_label = {}
|
||||||
|
relations_by_type = {}
|
||||||
|
triples = []
|
||||||
|
|
||||||
|
try:
|
||||||
|
for triple in self.triples:
|
||||||
|
if not all(key in triple for key in ['head', 'head_type', 'type', 'tail', 'tail_type']):
|
||||||
|
debug(f"无效三元组: {triple}")
|
||||||
|
continue
|
||||||
|
head, relation, tail, head_type, tail_type = (
|
||||||
|
triple['head'], triple['type'], triple['tail'], triple['head_type'], triple['tail_type']
|
||||||
|
)
|
||||||
|
head_label = self._normalize_label(head_type)
|
||||||
|
tail_label = self._normalize_label(tail_type)
|
||||||
|
debug(f"实体类型: {head_type} -> {head_label}, {tail_type} -> {tail_label}")
|
||||||
|
|
||||||
|
if head_label not in nodes_by_label:
|
||||||
|
nodes_by_label[head_label] = set()
|
||||||
|
if tail_label not in nodes_by_label:
|
||||||
|
nodes_by_label[tail_label] = set()
|
||||||
|
nodes_by_label[head_label].add(head)
|
||||||
|
nodes_by_label[tail_label].add(tail)
|
||||||
|
|
||||||
|
rel_type, rel_name = self._clean_relation(relation)
|
||||||
|
if rel_type not in relations_by_type:
|
||||||
|
relations_by_type[rel_type] = []
|
||||||
|
relations_by_type[rel_type].append({
|
||||||
|
'head': head,
|
||||||
|
'tail': tail,
|
||||||
|
'head_label': head_label,
|
||||||
|
'tail_label': tail_label,
|
||||||
|
'rel_name': rel_name
|
||||||
|
})
|
||||||
|
|
||||||
|
triples.append({
|
||||||
|
'head': head,
|
||||||
|
'relation': relation,
|
||||||
|
'tail': tail,
|
||||||
|
'head_type': head_type,
|
||||||
|
'tail_type': tail_type
|
||||||
|
})
|
||||||
|
|
||||||
|
info(f"读取节点: {sum(len(nodes) for nodes in nodes_by_label.values())} 个")
|
||||||
|
info(f"读取关系: {sum(len(rels) for rels in relations_by_type.values())} 条")
|
||||||
|
return nodes_by_label, relations_by_type, triples
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
error(f"读取三元组失败: {str(e)}")
|
||||||
|
raise RuntimeError(f"读取三元组失败: {str(e)}")
|
||||||
|
|
||||||
|
def create_node(self, label: str, nodes: Set[str]):
|
||||||
|
"""创建节点,包含 document_id、knowledge_base_id 和 userid 属性"""
|
||||||
|
count = 0
|
||||||
|
for node_name in nodes:
|
||||||
|
query = (
|
||||||
|
f"MATCH (n:{label} {{name: $name, document_id: $doc_id, "
|
||||||
|
f"knowledge_base_id: $kb_id, userid: $userid}}) RETURN n"
|
||||||
|
)
|
||||||
|
try:
|
||||||
|
if self.g.run(query, name=node_name, doc_id=self.document_id,
|
||||||
|
kb_id=self.knowledge_base_id, userid=self.userid).data():
|
||||||
|
continue
|
||||||
|
node = Node(
|
||||||
|
label,
|
||||||
|
name=node_name,
|
||||||
|
document_id=self.document_id,
|
||||||
|
knowledge_base_id=self.knowledge_base_id,
|
||||||
|
userid=self.userid
|
||||||
|
)
|
||||||
|
self.g.create(node)
|
||||||
|
count += 1
|
||||||
|
debug(f"创建节点: {label} - {node_name} (document_id: {self.document_id}, "
|
||||||
|
f"knowledge_base_id: {self.knowledge_base_id}, userid: {self.userid})")
|
||||||
|
except Exception as e:
|
||||||
|
error(f"创建节点失败: {label} - {node_name}, 错误: {str(e)}")
|
||||||
|
info(f"创建 {label} 节点: {count}/{len(nodes)} 个")
|
||||||
|
return count
|
||||||
|
|
||||||
|
def create_relationship(self, rel_type: str, relations: List[Dict]):
|
||||||
|
"""创建关系,包含 document_id、knowledge_base_id 和 userid 属性"""
|
||||||
|
count = 0
|
||||||
|
total = len(relations)
|
||||||
|
seen_edges = set()
|
||||||
|
for rel in relations:
|
||||||
|
head, tail, head_label, tail_label, rel_name = (
|
||||||
|
rel['head'], rel['tail'], rel['head_label'], rel['tail_label'], rel['rel_name']
|
||||||
|
)
|
||||||
|
edge_key = f"{head_label}:{head}###{tail_label}:{tail}###{rel_type}"
|
||||||
|
if edge_key in seen_edges:
|
||||||
|
continue
|
||||||
|
seen_edges.add(edge_key)
|
||||||
|
|
||||||
|
query = (
|
||||||
|
f"MATCH (p:{head_label} {{name: $head, document_id: $doc_id, "
|
||||||
|
f"knowledge_base_id: $kb_id, userid: $userid}}), "
|
||||||
|
f"(q:{tail_label} {{name: $tail, document_id: $doc_id, "
|
||||||
|
f"knowledge_base_id: $kb_id, userid: $userid}}) "
|
||||||
|
f"CREATE (p)-[r:{rel_type} {{name: $rel_name, document_id: $doc_id, "
|
||||||
|
f"knowledge_base_id: $kb_id, userid: $userid}}]->(q)"
|
||||||
|
)
|
||||||
|
try:
|
||||||
|
self.g.run(query, head=head, tail=tail, rel_name=rel_name,
|
||||||
|
doc_id=self.document_id, kb_id=self.knowledge_base_id,
|
||||||
|
userid=self.userid)
|
||||||
|
count += 1
|
||||||
|
debug(f"创建关系: {head} -[{rel_type}]-> {tail} (document_id: {self.document_id}, "
|
||||||
|
f"knowledge_base_id: {self.knowledge_base_id}, userid: {self.userid})")
|
||||||
|
except Exception as e:
|
||||||
|
error(f"创建关系失败: {query}, 错误: {str(e)}")
|
||||||
|
info(f"创建 {rel_type} 关系: {count}/{total} 条")
|
||||||
|
return count
|
||||||
|
|
||||||
|
def create_graphnodes(self):
|
||||||
|
"""创建所有节点"""
|
||||||
|
nodes_by_label, _, _ = self.read_nodes()
|
||||||
|
total = 0
|
||||||
|
for label, nodes in nodes_by_label.items():
|
||||||
|
total += self.create_node(label, nodes)
|
||||||
|
info(f"总计创建节点: {total} 个")
|
||||||
|
return total
|
||||||
|
|
||||||
|
def create_graphrels(self):
|
||||||
|
"""创建所有关系"""
|
||||||
|
_, relations_by_type, _ = self.read_nodes()
|
||||||
|
total = 0
|
||||||
|
for rel_type, relations in relations_by_type.items():
|
||||||
|
total += self.create_relationship(rel_type, relations)
|
||||||
|
info(f"总计创建关系: {total} 条")
|
||||||
|
return total
|
||||||
|
|
||||||
|
def export_data(self):
|
||||||
|
"""导出节点到文件,包含 document_id、knowledge_base_id 和 userid"""
|
||||||
|
nodes_by_label, _, _ = self.read_nodes()
|
||||||
|
os.makedirs('dict', exist_ok=True)
|
||||||
|
for label, nodes in nodes_by_label.items():
|
||||||
|
with open(f'dict/{label.lower()}.txt', 'w', encoding='utf-8') as f:
|
||||||
|
f.write('\n'.join(f"{name}\t{self.document_id}\t{self.knowledge_base_id}\t{self.userid}"
|
||||||
|
for name in sorted(nodes)))
|
||||||
|
info(f"导出 {label} 节点到 dict/{label.lower()}.txt: {len(nodes)} 个")
|
||||||
|
return
|
||||||
85
llmengine/ltpentity.py
Normal file
85
llmengine/ltpentity.py
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
from ltp import LTP
|
||||||
|
from typing import List
|
||||||
|
from appPublic.log import debug, info, error
|
||||||
|
from appPublic.worker import awaitify
|
||||||
|
from llmengine.base_entity import BaseLtp, ltp_register
|
||||||
|
import asyncio
|
||||||
|
|
||||||
|
class LtpEntity(BaseLtp):
|
||||||
|
def __init__(self, model_id):
|
||||||
|
# Load LTP model for CWS, POS, and NER
|
||||||
|
self.ltp = LTP(model_id)
|
||||||
|
self.model_id = model_id
|
||||||
|
self.model_name = model_id.split('/')[-1]
|
||||||
|
|
||||||
|
async def extract_entities(self, query: str) -> List[str]:
|
||||||
|
"""
|
||||||
|
从查询文本中抽取实体,包括:
|
||||||
|
- LTP NER 识别的实体(所有类型)。
|
||||||
|
- LTP POS 标注为名词('n')的词。
|
||||||
|
- LTP POS 标注为动词('v')的词。
|
||||||
|
- 连续名词合并(如 '苹果 公司' -> '苹果公司'),移除子词。
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
if not query:
|
||||||
|
raise ValueError("查询文本不能为空")
|
||||||
|
|
||||||
|
# 定义同步 pipeline 函数,正确传递 tasks 参数
|
||||||
|
def sync_pipeline(query, tasks):
|
||||||
|
return self.ltp.pipeline([query], tasks=tasks)
|
||||||
|
|
||||||
|
# 使用 run_in_executor 运行同步 pipeline
|
||||||
|
loop = asyncio.get_event_loop()
|
||||||
|
result = await loop.run_in_executor(
|
||||||
|
None,
|
||||||
|
lambda: sync_pipeline(query, ["cws", "pos", "ner"])
|
||||||
|
)
|
||||||
|
|
||||||
|
# 解析结果
|
||||||
|
words = result.cws[0]
|
||||||
|
pos_list = result.pos[0]
|
||||||
|
ner = result.ner[0]
|
||||||
|
|
||||||
|
entities = []
|
||||||
|
subword_set = set()
|
||||||
|
|
||||||
|
debug(f"NER 结果: {ner}")
|
||||||
|
for entity_type, entity, start, end in ner:
|
||||||
|
entities.append(entity)
|
||||||
|
|
||||||
|
combined = ""
|
||||||
|
combined_words = []
|
||||||
|
for i in range(len(words)):
|
||||||
|
if pos_list[i] == 'n':
|
||||||
|
combined += words[i]
|
||||||
|
combined_words.append(words[i])
|
||||||
|
if i + 1 < len(words) and pos_list[i + 1] == 'n':
|
||||||
|
continue
|
||||||
|
if combined:
|
||||||
|
entities.append(combined)
|
||||||
|
subword_set.update(combined_words)
|
||||||
|
debug(f"合并连续名词: {combined}, 子词: {combined_words}")
|
||||||
|
combined = ""
|
||||||
|
combined_words = []
|
||||||
|
else:
|
||||||
|
combined = ""
|
||||||
|
combined_words = []
|
||||||
|
debug(f"连续名词子词集合: {subword_set}")
|
||||||
|
|
||||||
|
for word, pos in zip(words, pos_list):
|
||||||
|
if pos == 'n' and word not in subword_set:
|
||||||
|
entities.append(word)
|
||||||
|
|
||||||
|
for word, pos in zip(words, pos_list):
|
||||||
|
if pos == 'v':
|
||||||
|
entities.append(word)
|
||||||
|
|
||||||
|
unique_entities = list(dict.fromkeys(entities))
|
||||||
|
info(f"从查询中提取到 {len(unique_entities)} 个唯一实体: {unique_entities}")
|
||||||
|
return unique_entities
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
error(f"实体抽取失败: {str(e)}")
|
||||||
|
raise # 抛出异常以便调试,而不是返回空列表
|
||||||
|
|
||||||
|
ltp_register('LTP', LtpEntity)
|
||||||
1536
llmengine/milvus_connection.py
Normal file
1536
llmengine/milvus_connection.py
Normal file
File diff suppressed because it is too large
Load Diff
161
llmengine/mrebeltriple.py
Normal file
161
llmengine/mrebeltriple.py
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
import os
|
||||||
|
import torch
|
||||||
|
import re
|
||||||
|
import traceback
|
||||||
|
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
||||||
|
from appPublic.log import debug, error, warning, info
|
||||||
|
from appPublic.worker import awaitify
|
||||||
|
from base_triple import BaseTripleExtractor, llm_register
|
||||||
|
|
||||||
|
class MRebelTripleExtractor(BaseTripleExtractor):
|
||||||
|
def __init__(self, model_path: str):
|
||||||
|
super().__init__(model_path)
|
||||||
|
try:
|
||||||
|
debug(f"Loading tokenizer from {model_path}")
|
||||||
|
self.tokenizer = AutoTokenizer.from_pretrained(model_path)
|
||||||
|
debug(f"Loading model from {model_path}")
|
||||||
|
self.model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
|
||||||
|
self.device = self.use_mps_if_possible()
|
||||||
|
if self.device.type == "cuda":
|
||||||
|
self.model = self.model.to(dtype=torch.float16)
|
||||||
|
debug("Model converted to FP16 for CUDA")
|
||||||
|
self.triplet_id = self.tokenizer.convert_tokens_to_ids("<triplet>")
|
||||||
|
debug(f"Loaded mREBEL model, triplet_id: {self.triplet_id}")
|
||||||
|
if self.device.type == "cuda":
|
||||||
|
debug(f"GPU memory allocated after model load: {torch.cuda.memory_allocated(self.device) / 1024**2:.2f} MB")
|
||||||
|
except Exception as e:
|
||||||
|
error(f"Failed to load mREBEL model: {str(e)}")
|
||||||
|
raise RuntimeError(f"Failed to load mREBEL model: {str(e)}")
|
||||||
|
|
||||||
|
self.gen_kwargs = {
|
||||||
|
"max_length": 256,
|
||||||
|
"min_length": 10,
|
||||||
|
"length_penalty": 0.5,
|
||||||
|
"num_beams": 3,
|
||||||
|
"num_return_sequences": 1,
|
||||||
|
"no_repeat_ngram_size": 2,
|
||||||
|
"early_stopping": True,
|
||||||
|
"decoder_start_token_id": self.triplet_id,
|
||||||
|
}
|
||||||
|
|
||||||
|
def extract_triplets_typed(self, text: str) -> list:
|
||||||
|
"""Parse mREBEL generated text for triplets."""
|
||||||
|
triplets = []
|
||||||
|
debug(f"Raw generated text: {text}")
|
||||||
|
|
||||||
|
tokens = []
|
||||||
|
in_tag = False
|
||||||
|
buffer = ""
|
||||||
|
for char in text:
|
||||||
|
if char == '<':
|
||||||
|
in_tag = True
|
||||||
|
if buffer:
|
||||||
|
tokens.append(buffer.strip())
|
||||||
|
buffer = ""
|
||||||
|
buffer += char
|
||||||
|
elif char == '>':
|
||||||
|
in_tag = False
|
||||||
|
buffer += char
|
||||||
|
tokens.append(buffer.strip())
|
||||||
|
buffer = ""
|
||||||
|
else:
|
||||||
|
buffer += char
|
||||||
|
if buffer:
|
||||||
|
tokens.append(buffer.strip())
|
||||||
|
|
||||||
|
special_tokens = ["<s>", "<pad>", "</s>", "tp_XX", "__en__", "__zh__", "zh_CN"]
|
||||||
|
tokens = [t for t in tokens if t not in special_tokens and t]
|
||||||
|
debug(f"Processed tokens: {tokens}")
|
||||||
|
|
||||||
|
i = 0
|
||||||
|
while i < len(tokens):
|
||||||
|
if tokens[i] == "<triplet>" and i + 5 < len(tokens):
|
||||||
|
entity1 = tokens[i + 1]
|
||||||
|
type1 = tokens[i + 2][1:-1] if tokens[i + 2].startswith("<") and tokens[i + 2].endswith(">") else ""
|
||||||
|
entity2 = tokens[i + 3]
|
||||||
|
type2 = tokens[i + 4][1:-1] if tokens[i + 4].startswith("<") and tokens[i + 4].endswith(">") else ""
|
||||||
|
relation = tokens[i + 5]
|
||||||
|
|
||||||
|
if entity1 and type1 and entity2 and type2 and relation:
|
||||||
|
triplets.append({
|
||||||
|
'head': entity1.strip(),
|
||||||
|
'head_type': type1,
|
||||||
|
'type': relation.strip(),
|
||||||
|
'tail': entity2.strip(),
|
||||||
|
'tail_type': type2
|
||||||
|
})
|
||||||
|
debug(f"Added triplet: {entity1}({type1}) - {relation} - {entity2}({type2})")
|
||||||
|
i += 6
|
||||||
|
else:
|
||||||
|
i += 1
|
||||||
|
|
||||||
|
return triplets
|
||||||
|
|
||||||
|
async def extract_triplets(self, text: str) -> list:
|
||||||
|
"""Extract triplets from text, splitting into sub-chunks by .; and \n."""
|
||||||
|
try:
|
||||||
|
if not text:
|
||||||
|
raise ValueError("Text cannot be empty")
|
||||||
|
|
||||||
|
# 按 .、;、\n 分割文本为子片段
|
||||||
|
sub_texts = re.split(r'[.;\n]+', text)
|
||||||
|
sub_texts = [sub.strip() for sub in sub_texts if sub.strip() and len(sub.strip()) >= 10]
|
||||||
|
debug(f"Split text into {len(sub_texts)} sub-chunks: {[sub[:50] for sub in sub_texts[:5]]}")
|
||||||
|
token_lengths = [len(self.tokenizer(sub, add_special_tokens=False)['input_ids']) for sub in sub_texts]
|
||||||
|
debug(f"Sub-chunk token lengths: {token_lengths}")
|
||||||
|
if any(length > 256 for length in token_lengths):
|
||||||
|
warning(f"Some sub-chunks exceed max_length=256: {token_lengths}")
|
||||||
|
|
||||||
|
# 记录开始时的 GPU 内存
|
||||||
|
if self.device.type == "cuda":
|
||||||
|
debug(f"GPU memory allocated before processing chunk: {torch.cuda.memory_allocated(self.device) / 1024**2:.2f} MB")
|
||||||
|
|
||||||
|
# 批量处理子片段
|
||||||
|
batch_size = 10
|
||||||
|
triplets = []
|
||||||
|
for batch_start in range(0, len(sub_texts), batch_size):
|
||||||
|
batch_texts = sub_texts[batch_start:batch_start + batch_size]
|
||||||
|
debug(f"Processing batch {batch_start // batch_size + 1} with {len(batch_texts)} sub-chunks")
|
||||||
|
|
||||||
|
# 批量编码
|
||||||
|
model_inputs = self.tokenizer(
|
||||||
|
batch_texts,
|
||||||
|
max_length=256,
|
||||||
|
padding=True,
|
||||||
|
truncation=True,
|
||||||
|
return_tensors="pt"
|
||||||
|
).to(self.device)
|
||||||
|
|
||||||
|
try:
|
||||||
|
with torch.cuda.amp.autocast():
|
||||||
|
generated_tokens = self.model.generate(
|
||||||
|
model_inputs["input_ids"],
|
||||||
|
attention_mask=model_inputs["attention_mask"],
|
||||||
|
**self.gen_kwargs
|
||||||
|
)
|
||||||
|
decoded_preds = self.tokenizer.batch_decode(generated_tokens, skip_special_tokens=False)
|
||||||
|
for idx, sentence in enumerate(decoded_preds):
|
||||||
|
debug(f"Sub-chunk {batch_start + idx + 1} generated text: {sentence[:50]}...")
|
||||||
|
chunk_triplets = self.extract_triplets_typed(sentence)
|
||||||
|
if chunk_triplets:
|
||||||
|
debug(f"Sub-chunk {batch_start + idx + 1} extracted {len(chunk_triplets)} triplets: {chunk_triplets}")
|
||||||
|
triplets.extend(chunk_triplets)
|
||||||
|
except Exception as e:
|
||||||
|
warning(f"Error processing batch {batch_start // batch_size + 1}: {str(e)}")
|
||||||
|
continue
|
||||||
|
|
||||||
|
# 记录结束时的 GPU 内存
|
||||||
|
if self.device.type == "cuda":
|
||||||
|
debug(f"GPU memory allocated after processing chunk: {torch.cuda.memory_allocated(self.device) / 1024**2:.2f} MB")
|
||||||
|
torch.cuda.empty_cache()
|
||||||
|
debug(f"GPU memory cleared after processing chunk")
|
||||||
|
|
||||||
|
debug(f"Total extracted {len(triplets)} triplets from {len(sub_texts)} sub-chunks")
|
||||||
|
return triplets
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
error(f"Failed to extract triplets: {str(e)}")
|
||||||
|
debug(f"Traceback: {traceback.format_exc()}")
|
||||||
|
return []
|
||||||
|
|
||||||
|
llm_register("mrebel-large", MRebelTripleExtractor)
|
||||||
0
llmengine/requirments.txt
Normal file
0
llmengine/requirments.txt
Normal file
127
llmengine/triple.py
Normal file
127
llmengine/triple.py
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
from traceback import format_exc
|
||||||
|
import os
|
||||||
|
import argparse
|
||||||
|
import logging
|
||||||
|
from typing import List
|
||||||
|
from base_triple import get_llm_class
|
||||||
|
from mrebeltriple import MRebelTripleExtractor
|
||||||
|
from appPublic.registerfunction import RegisterFunction
|
||||||
|
from appPublic.log import debug, exception, error, info
|
||||||
|
from appPublic.jsonConfig import getConfig
|
||||||
|
from ahserver.serverenv import ServerEnv
|
||||||
|
from ahserver.globalEnv import stream_response
|
||||||
|
from ahserver.webapp import webserver
|
||||||
|
import aiohttp.web
|
||||||
|
import time
|
||||||
|
|
||||||
|
# 配置日志
|
||||||
|
|
||||||
|
helptext = """mREBEL Triplets API:
|
||||||
|
|
||||||
|
1. Triplets Endpoint:
|
||||||
|
path: /v1/triples
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
data: {
|
||||||
|
"text": "知识图谱是一个结构化的语义知识库。"
|
||||||
|
}
|
||||||
|
response: {
|
||||||
|
"object": "list",
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"head": "知识图谱",
|
||||||
|
"head_type": "Concept",
|
||||||
|
"type": "is_a",
|
||||||
|
"tail": "语义知识库",
|
||||||
|
"tail_type": "Concept"
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
2. Docs Endpoint:
|
||||||
|
path: /v1/docs
|
||||||
|
response: This help text
|
||||||
|
"""
|
||||||
|
|
||||||
|
# 请求计数器
|
||||||
|
request_count = 0
|
||||||
|
|
||||||
|
def init():
|
||||||
|
rf = RegisterFunction()
|
||||||
|
rf.register('triples', triples)
|
||||||
|
rf.register('docs', docs)
|
||||||
|
|
||||||
|
async def docs(request, params_kw, *params, **kw):
|
||||||
|
return helptext
|
||||||
|
|
||||||
|
async def triples(request, params_kw, *params, **kw):
|
||||||
|
global request_count
|
||||||
|
request_count += 1
|
||||||
|
request_id = request_count
|
||||||
|
debug(f"Processing request #{request_id}, params_kw: {params_kw}")
|
||||||
|
start_time = time.time()
|
||||||
|
try:
|
||||||
|
# 显式解析请求数据
|
||||||
|
if not params_kw:
|
||||||
|
try:
|
||||||
|
data = await request.json()
|
||||||
|
params_kw = data
|
||||||
|
debug(f"Request #{request_id} parsed JSON data: {params_kw}")
|
||||||
|
except Exception as e:
|
||||||
|
error(f"Request #{request_id} failed to parse JSON: {str(e)}")
|
||||||
|
raise aiohttp.web.HTTPBadRequest(reason=f"Invalid JSON: {str(e)}")
|
||||||
|
|
||||||
|
se = ServerEnv()
|
||||||
|
engine = se.engine
|
||||||
|
if engine is None:
|
||||||
|
error(f"Request #{request_id} error: Engine not initialized")
|
||||||
|
raise ValueError("Engine not initialized")
|
||||||
|
|
||||||
|
text = params_kw.get('text')
|
||||||
|
if not text:
|
||||||
|
e = ValueError("text cannot be empty")
|
||||||
|
error(f"Request #{request_id} error: {str(e)}")
|
||||||
|
exception(f'{e}')
|
||||||
|
raise e
|
||||||
|
|
||||||
|
triplets = await engine.extract_triplets(text)
|
||||||
|
debug(f"Request #{request_id} extracted {len(triplets)} triplets, took {time.time() - start_time:.2f} seconds")
|
||||||
|
return {
|
||||||
|
"object": "list",
|
||||||
|
"data": triplets
|
||||||
|
}
|
||||||
|
except Exception as e:
|
||||||
|
error(f"Request #{request_id} error in triples endpoint: {str(e)}")
|
||||||
|
debug(f"Request #{request_id} traceback: {format_exc()}")
|
||||||
|
raise
|
||||||
|
finally:
|
||||||
|
debug(f"Request #{request_id} completed, total time: {time.time() - start_time:.2f} seconds")
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(prog="mREBEL Triplet Service")
|
||||||
|
parser.add_argument('-w', '--workdir', default=None)
|
||||||
|
parser.add_argument('-p', '--port', type=int, default=9991)
|
||||||
|
parser.add_argument('model_path')
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
try:
|
||||||
|
Klass = get_llm_class(args.model_path)
|
||||||
|
if Klass is None:
|
||||||
|
e = Exception(f"{args.model_path} has no mapping to a model class")
|
||||||
|
exception(f'{e}, {format_exc()}')
|
||||||
|
raise e
|
||||||
|
|
||||||
|
se = ServerEnv()
|
||||||
|
se.engine = Klass(args.model_path)
|
||||||
|
workdir = args.workdir or os.getcwd()
|
||||||
|
port = args.port
|
||||||
|
webserver(init, workdir, port)
|
||||||
|
except Exception as e:
|
||||||
|
error(f"Failed to start server: {str(e)}")
|
||||||
|
debug(f"Traceback: {format_exc()}")
|
||||||
|
raise
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
82
test/bgererank/=1.3.3
Normal file
82
test/bgererank/=1.3.3
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
Requirement already satisfied: FlagEmbedding in /share/vllm-0.8.5/lib/python3.10/site-packages (1.3.5)
|
||||||
|
Requirement already satisfied: torch>=1.6.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from FlagEmbedding) (2.6.0)
|
||||||
|
Requirement already satisfied: transformers>=4.44.2 in /share/vllm-0.8.5/lib/python3.10/site-packages (from FlagEmbedding) (4.51.3)
|
||||||
|
Requirement already satisfied: datasets>=2.19.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from FlagEmbedding) (3.6.0)
|
||||||
|
Requirement already satisfied: accelerate>=0.20.1 in /share/vllm-0.8.5/lib/python3.10/site-packages (from FlagEmbedding) (1.7.0)
|
||||||
|
Requirement already satisfied: sentence_transformers in /share/vllm-0.8.5/lib/python3.10/site-packages (from FlagEmbedding) (4.1.0)
|
||||||
|
Requirement already satisfied: peft in /share/vllm-0.8.5/lib/python3.10/site-packages (from FlagEmbedding) (0.16.0)
|
||||||
|
Requirement already satisfied: ir-datasets in /share/vllm-0.8.5/lib/python3.10/site-packages (from FlagEmbedding) (0.5.11)
|
||||||
|
Requirement already satisfied: sentencepiece in /share/vllm-0.8.5/lib/python3.10/site-packages (from FlagEmbedding) (0.2.0)
|
||||||
|
Requirement already satisfied: protobuf in /share/vllm-0.8.5/lib/python3.10/site-packages (from FlagEmbedding) (4.25.7)
|
||||||
|
Requirement already satisfied: psutil in /share/vllm-0.8.5/lib/python3.10/site-packages (from accelerate>=0.20.1->FlagEmbedding) (7.0.0)
|
||||||
|
Requirement already satisfied: numpy<3.0.0,>=1.17 in /share/vllm-0.8.5/lib/python3.10/site-packages (from accelerate>=0.20.1->FlagEmbedding) (2.2.5)
|
||||||
|
Requirement already satisfied: safetensors>=0.4.3 in /share/vllm-0.8.5/lib/python3.10/site-packages (from accelerate>=0.20.1->FlagEmbedding) (0.5.3)
|
||||||
|
Requirement already satisfied: packaging>=20.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from accelerate>=0.20.1->FlagEmbedding) (24.2)
|
||||||
|
Requirement already satisfied: pyyaml in /share/vllm-0.8.5/lib/python3.10/site-packages (from accelerate>=0.20.1->FlagEmbedding) (6.0.2)
|
||||||
|
Requirement already satisfied: huggingface-hub>=0.21.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from accelerate>=0.20.1->FlagEmbedding) (0.30.2)
|
||||||
|
Requirement already satisfied: pyarrow>=15.0.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from datasets>=2.19.0->FlagEmbedding) (20.0.0)
|
||||||
|
Requirement already satisfied: fsspec[http]<=2025.3.0,>=2023.1.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from datasets>=2.19.0->FlagEmbedding) (2025.3.0)
|
||||||
|
Requirement already satisfied: xxhash in /share/vllm-0.8.5/lib/python3.10/site-packages (from datasets>=2.19.0->FlagEmbedding) (3.5.0)
|
||||||
|
Requirement already satisfied: multiprocess<0.70.17 in /share/vllm-0.8.5/lib/python3.10/site-packages (from datasets>=2.19.0->FlagEmbedding) (0.70.16)
|
||||||
|
Requirement already satisfied: tqdm>=4.66.3 in /share/vllm-0.8.5/lib/python3.10/site-packages (from datasets>=2.19.0->FlagEmbedding) (4.67.1)
|
||||||
|
Requirement already satisfied: pandas in /share/vllm-0.8.5/lib/python3.10/site-packages (from datasets>=2.19.0->FlagEmbedding) (2.3.0)
|
||||||
|
Requirement already satisfied: dill<0.3.9,>=0.3.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from datasets>=2.19.0->FlagEmbedding) (0.3.8)
|
||||||
|
Requirement already satisfied: filelock in /share/vllm-0.8.5/lib/python3.10/site-packages (from datasets>=2.19.0->FlagEmbedding) (3.18.0)
|
||||||
|
Requirement already satisfied: requests>=2.32.2 in /share/vllm-0.8.5/lib/python3.10/site-packages (from datasets>=2.19.0->FlagEmbedding) (2.32.3)
|
||||||
|
Requirement already satisfied: nvidia-cusparselt-cu12==0.6.2 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (0.6.2)
|
||||||
|
Requirement already satisfied: sympy==1.13.1 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (1.13.1)
|
||||||
|
Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.4.127 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (12.4.127)
|
||||||
|
Requirement already satisfied: triton==3.2.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (3.2.0)
|
||||||
|
Requirement already satisfied: jinja2 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (3.1.6)
|
||||||
|
Requirement already satisfied: nvidia-cusolver-cu12==11.6.1.9 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (11.6.1.9)
|
||||||
|
Requirement already satisfied: typing-extensions>=4.10.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (4.13.2)
|
||||||
|
Requirement already satisfied: nvidia-nvtx-cu12==12.4.127 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (12.4.127)
|
||||||
|
Requirement already satisfied: nvidia-nccl-cu12==2.21.5 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (2.21.5)
|
||||||
|
Requirement already satisfied: nvidia-cuda-cupti-cu12==12.4.127 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (12.4.127)
|
||||||
|
Requirement already satisfied: nvidia-cuda-runtime-cu12==12.4.127 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (12.4.127)
|
||||||
|
Requirement already satisfied: nvidia-cufft-cu12==11.2.1.3 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (11.2.1.3)
|
||||||
|
Requirement already satisfied: nvidia-cublas-cu12==12.4.5.8 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (12.4.5.8)
|
||||||
|
Requirement already satisfied: nvidia-curand-cu12==10.3.5.147 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (10.3.5.147)
|
||||||
|
Requirement already satisfied: nvidia-nvjitlink-cu12==12.4.127 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (12.4.127)
|
||||||
|
Requirement already satisfied: nvidia-cudnn-cu12==9.1.0.70 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (9.1.0.70)
|
||||||
|
Requirement already satisfied: networkx in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (3.4.2)
|
||||||
|
Requirement already satisfied: nvidia-cusparse-cu12==12.3.1.170 in /share/vllm-0.8.5/lib/python3.10/site-packages (from torch>=1.6.0->FlagEmbedding) (12.3.1.170)
|
||||||
|
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from sympy==1.13.1->torch>=1.6.0->FlagEmbedding) (1.3.0)
|
||||||
|
Requirement already satisfied: tokenizers<0.22,>=0.21 in /share/vllm-0.8.5/lib/python3.10/site-packages (from transformers>=4.44.2->FlagEmbedding) (0.21.1)
|
||||||
|
Requirement already satisfied: regex!=2019.12.17 in /share/vllm-0.8.5/lib/python3.10/site-packages (from transformers>=4.44.2->FlagEmbedding) (2024.11.6)
|
||||||
|
Requirement already satisfied: zlib-state>=0.1.3 in /share/vllm-0.8.5/lib/python3.10/site-packages (from ir-datasets->FlagEmbedding) (0.1.9)
|
||||||
|
Requirement already satisfied: trec-car-tools>=2.5.4 in /share/vllm-0.8.5/lib/python3.10/site-packages (from ir-datasets->FlagEmbedding) (2.6)
|
||||||
|
Requirement already satisfied: lz4>=3.1.10 in /share/vllm-0.8.5/lib/python3.10/site-packages (from ir-datasets->FlagEmbedding) (4.4.4)
|
||||||
|
Requirement already satisfied: ijson>=3.1.3 in /share/vllm-0.8.5/lib/python3.10/site-packages (from ir-datasets->FlagEmbedding) (3.4.0)
|
||||||
|
Requirement already satisfied: warc3-wet>=0.2.3 in /share/vllm-0.8.5/lib/python3.10/site-packages (from ir-datasets->FlagEmbedding) (0.2.5)
|
||||||
|
Requirement already satisfied: inscriptis>=2.2.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from ir-datasets->FlagEmbedding) (2.6.0)
|
||||||
|
Requirement already satisfied: beautifulsoup4>=4.4.1 in /share/vllm-0.8.5/lib/python3.10/site-packages (from ir-datasets->FlagEmbedding) (4.13.4)
|
||||||
|
Requirement already satisfied: lxml>=4.5.2 in /share/vllm-0.8.5/lib/python3.10/site-packages (from ir-datasets->FlagEmbedding) (4.9.4)
|
||||||
|
Requirement already satisfied: warc3-wet-clueweb09>=0.2.5 in /share/vllm-0.8.5/lib/python3.10/site-packages (from ir-datasets->FlagEmbedding) (0.2.5)
|
||||||
|
Requirement already satisfied: unlzw3>=0.2.1 in /share/vllm-0.8.5/lib/python3.10/site-packages (from ir-datasets->FlagEmbedding) (0.2.3)
|
||||||
|
Requirement already satisfied: scikit-learn in /share/vllm-0.8.5/lib/python3.10/site-packages (from sentence_transformers->FlagEmbedding) (1.7.0)
|
||||||
|
Requirement already satisfied: Pillow in /share/vllm-0.8.5/lib/python3.10/site-packages (from sentence_transformers->FlagEmbedding) (11.2.1)
|
||||||
|
Requirement already satisfied: scipy in /share/vllm-0.8.5/lib/python3.10/site-packages (from sentence_transformers->FlagEmbedding) (1.15.2)
|
||||||
|
Requirement already satisfied: soupsieve>1.2 in /share/vllm-0.8.5/lib/python3.10/site-packages (from beautifulsoup4>=4.4.1->ir-datasets->FlagEmbedding) (2.7)
|
||||||
|
Requirement already satisfied: aiohttp!=4.0.0a0,!=4.0.0a1 in /share/vllm-0.8.5/lib/python3.10/site-packages (from fsspec[http]<=2025.3.0,>=2023.1.0->datasets>=2.19.0->FlagEmbedding) (3.10.10)
|
||||||
|
Requirement already satisfied: idna<4,>=2.5 in /share/vllm-0.8.5/lib/python3.10/site-packages (from requests>=2.32.2->datasets>=2.19.0->FlagEmbedding) (3.10)
|
||||||
|
Requirement already satisfied: charset-normalizer<4,>=2 in /share/vllm-0.8.5/lib/python3.10/site-packages (from requests>=2.32.2->datasets>=2.19.0->FlagEmbedding) (3.4.1)
|
||||||
|
Requirement already satisfied: urllib3<3,>=1.21.1 in /share/vllm-0.8.5/lib/python3.10/site-packages (from requests>=2.32.2->datasets>=2.19.0->FlagEmbedding) (2.4.0)
|
||||||
|
Requirement already satisfied: certifi>=2017.4.17 in /share/vllm-0.8.5/lib/python3.10/site-packages (from requests>=2.32.2->datasets>=2.19.0->FlagEmbedding) (2025.4.26)
|
||||||
|
Requirement already satisfied: cbor>=1.0.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from trec-car-tools>=2.5.4->ir-datasets->FlagEmbedding) (1.0.0)
|
||||||
|
Requirement already satisfied: MarkupSafe>=2.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from jinja2->torch>=1.6.0->FlagEmbedding) (3.0.2)
|
||||||
|
Requirement already satisfied: python-dateutil>=2.8.2 in /share/vllm-0.8.5/lib/python3.10/site-packages (from pandas->datasets>=2.19.0->FlagEmbedding) (2.9.0.post0)
|
||||||
|
Requirement already satisfied: tzdata>=2022.7 in /share/vllm-0.8.5/lib/python3.10/site-packages (from pandas->datasets>=2.19.0->FlagEmbedding) (2025.2)
|
||||||
|
Requirement already satisfied: pytz>=2020.1 in /share/vllm-0.8.5/lib/python3.10/site-packages (from pandas->datasets>=2.19.0->FlagEmbedding) (2025.2)
|
||||||
|
Requirement already satisfied: threadpoolctl>=3.1.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from scikit-learn->sentence_transformers->FlagEmbedding) (3.6.0)
|
||||||
|
Requirement already satisfied: joblib>=1.2.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from scikit-learn->sentence_transformers->FlagEmbedding) (1.5.1)
|
||||||
|
Requirement already satisfied: async-timeout<5.0,>=4.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2025.3.0,>=2023.1.0->datasets>=2.19.0->FlagEmbedding) (4.0.3)
|
||||||
|
Requirement already satisfied: aiosignal>=1.1.2 in /share/vllm-0.8.5/lib/python3.10/site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2025.3.0,>=2023.1.0->datasets>=2.19.0->FlagEmbedding) (1.3.2)
|
||||||
|
Requirement already satisfied: yarl<2.0,>=1.12.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2025.3.0,>=2023.1.0->datasets>=2.19.0->FlagEmbedding) (1.20.0)
|
||||||
|
Requirement already satisfied: multidict<7.0,>=4.5 in /share/vllm-0.8.5/lib/python3.10/site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2025.3.0,>=2023.1.0->datasets>=2.19.0->FlagEmbedding) (6.4.3)
|
||||||
|
Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2025.3.0,>=2023.1.0->datasets>=2.19.0->FlagEmbedding) (2.6.1)
|
||||||
|
Requirement already satisfied: attrs>=17.3.0 in /share/vllm-0.8.5/lib/python3.10/site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2025.3.0,>=2023.1.0->datasets>=2.19.0->FlagEmbedding) (25.3.0)
|
||||||
|
Requirement already satisfied: frozenlist>=1.1.1 in /share/vllm-0.8.5/lib/python3.10/site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2025.3.0,>=2023.1.0->datasets>=2.19.0->FlagEmbedding) (1.6.0)
|
||||||
|
Requirement already satisfied: six>=1.5 in /share/vllm-0.8.5/lib/python3.10/site-packages (from python-dateutil>=2.8.2->pandas->datasets>=2.19.0->FlagEmbedding) (1.17.0)
|
||||||
|
Requirement already satisfied: propcache>=0.2.1 in /share/vllm-0.8.5/lib/python3.10/site-packages (from yarl<2.0,>=1.12.0->aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2025.3.0,>=2023.1.0->datasets>=2.19.0->FlagEmbedding) (0.3.1)
|
||||||
47
test/bgererank/conf/config.json
Normal file
47
test/bgererank/conf/config.json
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"filesroot": "$[workdir]$/files",
|
||||||
|
"logger": {
|
||||||
|
"name": "llmengine",
|
||||||
|
"levelname": "info",
|
||||||
|
"logfile": "$[workdir]$/logs/llmengine.log"
|
||||||
|
},
|
||||||
|
"website": {
|
||||||
|
"paths": [
|
||||||
|
["$[workdir]$/wwwroot", ""]
|
||||||
|
],
|
||||||
|
"client_max_size": 10000,
|
||||||
|
"host": "0.0.0.0",
|
||||||
|
"port": 8887,
|
||||||
|
"coding": "utf-8",
|
||||||
|
"indexes": [
|
||||||
|
"index.html",
|
||||||
|
"index.ui"
|
||||||
|
],
|
||||||
|
"startswiths": [
|
||||||
|
{
|
||||||
|
"leading": "/v1/bgererank",
|
||||||
|
"registerfunction": "bgererank"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/v1/docs",
|
||||||
|
"registerfunction": "docs"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"processors": [
|
||||||
|
[".tmpl", "tmpl"],
|
||||||
|
[".app", "app"],
|
||||||
|
[".ui", "bui"],
|
||||||
|
[".dspy", "dspy"],
|
||||||
|
[".md", "md"]
|
||||||
|
],
|
||||||
|
"rsakey_oops": {
|
||||||
|
"privatekey": "$[workdir]$/conf/rsa_private_key.pem",
|
||||||
|
"publickey": "$[workdir]$/conf/rsa_public_key.pem"
|
||||||
|
},
|
||||||
|
"session_max_time": 3000,
|
||||||
|
"session_issue_time": 2500,
|
||||||
|
"session_redis_notuse": {
|
||||||
|
"url": "redis://127.0.0.1:6379"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
test/bgererank/entities.service
Normal file
14
test/bgererank/entities.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Wants=systemd-networkd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/share/run/entities
|
||||||
|
ExecStart=/share/run/entities/start.sh
|
||||||
|
ExecStop=/share/run/entities/stop.sh
|
||||||
|
StandardOutput=append:/var/log/entities/entities.log
|
||||||
|
StandardError=append:/var/log/entities/entities.log
|
||||||
|
SyslogIdentifier=entities
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
0
test/bgererank/logs/llmengine.log
Normal file
0
test/bgererank/logs/llmengine.log
Normal file
3
test/bgererank/start.sh
Executable file
3
test/bgererank/start.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
/share/vllm-0.8.5/bin/python -m llmengine.bgererank -p 8887 /share/models/BAAI/bge-reranker-v2-m3
|
||||||
10
test/bgererank/stop.sh
Normal file
10
test/bgererank/stop.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# 查找并终止运行在端口 8887 上的进程
|
||||||
|
pid=$(lsof -t -i:8887)
|
||||||
|
if [ -n "$pid" ]; then
|
||||||
|
echo "终止进程: $pid"
|
||||||
|
kill -9 $pid
|
||||||
|
else
|
||||||
|
echo "未找到运行在端口 8887 上的进程"
|
||||||
|
fi
|
||||||
0
test/connection/.milvus.db.lock
Normal file
0
test/connection/.milvus.db.lock
Normal file
93
test/connection/conf/config.json
Normal file
93
test/connection/conf/config.json
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"filesroot": "$[workdir]$/files",
|
||||||
|
"milvus_db": "$[workdir]$/milvus.db",
|
||||||
|
"neo4j": {
|
||||||
|
"uri": "bolt://10.18.34.18:7687",
|
||||||
|
"user": "neo4j",
|
||||||
|
"password": "261229..wmh"
|
||||||
|
},
|
||||||
|
"logger": {
|
||||||
|
"name": "llmengine",
|
||||||
|
"levelname": "info",
|
||||||
|
"logfile": "$[workdir]$/logs/llmengine.log"
|
||||||
|
},
|
||||||
|
"website": {
|
||||||
|
"paths": [
|
||||||
|
["$[workdir]$/wwwroot", ""]
|
||||||
|
],
|
||||||
|
"client_max_size": 10000,
|
||||||
|
"host": "0.0.0.0",
|
||||||
|
"port": 8888,
|
||||||
|
"coding": "utf-8",
|
||||||
|
"indexes": [
|
||||||
|
"index.html",
|
||||||
|
"index.ui"
|
||||||
|
],
|
||||||
|
"startswiths": [
|
||||||
|
{
|
||||||
|
"leading": "/idfile",
|
||||||
|
"registerfunction": "idfile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/v1/connection",
|
||||||
|
"registerfunction": "connection"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/v1/createcollection",
|
||||||
|
"registerfunction": "createcollection"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/v1/deletecollection",
|
||||||
|
"registerfunction": "deletecollection"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/v1/insertfile",
|
||||||
|
"registerfunction": "insertfile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/v1/deletefile",
|
||||||
|
"registerfunction": "deletefile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/v1/deleteknowledgebase",
|
||||||
|
"registerfunction": "deleteknowledgebase"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/v1/fusedsearchquery",
|
||||||
|
"registerfunction": "fusedsearchquery"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/v1/searchquery",
|
||||||
|
"registerfunction": "searchquery"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/v1/listuserfiles",
|
||||||
|
"registerfunction": "listuserfiles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/v1/listallknowledgebases",
|
||||||
|
"registerfunction": "listallknowledgebases"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leading": "/docs",
|
||||||
|
"registerfunction": "docs"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"processors": [
|
||||||
|
[".tmpl", "tmpl"],
|
||||||
|
[".app", "app"],
|
||||||
|
[".ui", "bui"],
|
||||||
|
[".dspy", "dspy"],
|
||||||
|
[".md", "md"]
|
||||||
|
],
|
||||||
|
"rsakey_oops": {
|
||||||
|
"privatekey": "$[workdir]$/conf/rsa_private_key.pem",
|
||||||
|
"publickey": "$[workdir]$/conf/rsa_public_key.pem"
|
||||||
|
},
|
||||||
|
"session_max_time": 3000,
|
||||||
|
"session_issue_time": 2500,
|
||||||
|
"session_redis_notuse": {
|
||||||
|
"url": "redis://127.0.0.1:6379"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
test/connection/connection.service
Normal file
14
test/connection/connection.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Wants=systemd-networkd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
WorkingDirectory=/share/run/connection
|
||||||
|
ExecStart=/share/run/connection/start.sh
|
||||||
|
ExecStop=/share/run/connection/stop.sh
|
||||||
|
StandardOutput=append:/var/log/connection/connection.log
|
||||||
|
StandardError=append:/var/log/connection/connection.log
|
||||||
|
SyslogIdentifier=/share/run/connection
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
3
test/connection/dict/cel.txt
Normal file
3
test/connection/dict/cel.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<per> c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
s- expression c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
单位 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
4
test/connection/dict/concept.txt
Normal file
4
test/connection/dict/concept.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
云计算 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
|
南京未来网络研究院 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
|
算力云 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
|
阿里云 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
15
test/connection/dict/date.txt
Normal file
15
test/connection/dict/date.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
1845 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
1851 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
1859 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
1862 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
1863 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
1864 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
1867 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
1870 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
1880 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
1989 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
1998 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
2007 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
2011 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
2019 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
2020 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
6
test/connection/dict/dis.txt
Normal file
6
test/connection/dict/dis.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
47 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
LNCS 3136 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
LNCS 8724 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
Natural lingual c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
Wikitionary c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
三元组 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
6
test/connection/dict/eve.txt
Normal file
6
test/connection/dict/eve.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
CQA c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
LC-QuAD c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
interpretables c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
knowledge based question mark c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
participant c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
逻辑形式 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
1
test/connection/dict/loc.txt
Normal file
1
test/connection/dict/loc.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
国家超级计算济南中心 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
3
test/connection/dict/media.txt
Normal file
3
test/connection/dict/media.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
SaaS化 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
|
云服务 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
|
阿里云计算 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
1
test/connection/dict/misc.txt
Normal file
1
test/connection/dict/misc.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
工业软件 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
1
test/connection/dict/num.txt
Normal file
1
test/connection/dict/num.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
5 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
3
test/connection/dict/org.txt
Normal file
3
test/connection/dict/org.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
开元云 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
|
教育部 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
|
江苏未来网络集团 7ac1bc35-7720-406b-950e-5a5639b27a77
|
||||||
25
test/connection/dict/per.txt
Normal file
25
test/connection/dict/per.txt
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
ANSARI G A c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
BOLLACKER K c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
BORDES A c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
CHEN Zirui c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
GETOOR L c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
GUR I c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
JENNINGS N R. c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
Justin Bieber c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
LEI Z c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
XU Dawei c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
XU K c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
YAHYA M, BERBERICH K, ELBASSUONI S c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
YAHYA M, BERBERICH K, SSUONI S E B c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
YAN Z c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
YIN W P, c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
ZHANG Y c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
ZHANG Y Y c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
ZHANG Y Z c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
ZHANG Y, c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
ZHOU M c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
question c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
查 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
贾勇哲 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
邹磊 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
陈子睿 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
7
test/connection/dict/time.txt
Normal file
7
test/connection/dict/time.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
48 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
Natural machine c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
ReverbMapping c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
变量映射到最终的逻辑形式 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
查询 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
正确答案集 A的查询语句 y的逻辑形式 z c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
结构表示的 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
2
test/connection/dict/triplet.txt
Normal file
2
test/connection/dict/triplet.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
instance of 844c1ba2-2f9c-45d5-aabf-d1f84cfa5155
|
||||||
|
part of 844c1ba2-2f9c-45d5-aabf-d1f84cfa5155
|
||||||
15
test/connection/dict/unk.txt
Normal file
15
test/connection/dict/unk.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
6th c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
KG 信息的利用仅通过人 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
SU Y c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
ZHANG X B. c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
convolutional network for educational knowledge base question answering c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
Ақпарат X X D F B KP S H Journal of Frontiers of Computer Science and Technology计算机科学与探索 2021 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
信 息有限的自然语言问题 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
大规模数 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
张莹莹 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
排序生成最终逻辑形 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
模板匹配流水线 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
知识图谱 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
等 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
连接与桥接过程中的跳过词 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
|
问答系统 c93f4c3c-dcff-43b6-bdb1-6a9db23ff582
|
||||||
0
test/connection/logs/llmengine.log
Normal file
0
test/connection/logs/llmengine.log
Normal file
BIN
test/connection/milvus.db
Normal file
BIN
test/connection/milvus.db
Normal file
Binary file not shown.
2
test/connection/start.sh
Executable file
2
test/connection/start.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
CUDA_VISIBLE_DEVICES=7 /share/vllm-0.8.5/bin/python -m llmengine.connection -p 8888 Milvus &
|
||||||
12
test/connection/stop.sh
Executable file
12
test/connection/stop.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PORT=8888
|
||||||
|
PID=$(lsof -t -i:$PORT)
|
||||||
|
|
||||||
|
if [ -n "$PID" ]; then
|
||||||
|
echo "找到端口 $PORT 的进程: PID=$PID"
|
||||||
|
kill -9 $PID
|
||||||
|
echo "已终止端口 $PORT 的进程"
|
||||||
|
else
|
||||||
|
echo "未找到端口 $PORT 的进程"
|
||||||
|
fi
|
||||||
50
test/entities/conf/config.json
Normal file
50
test/entities/conf/config.json
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"filesroot":"$[workdir]$/files",
|
||||||
|
"logger":{
|
||||||
|
"name":"llmengine",
|
||||||
|
"levelname":"info",
|
||||||
|
"logfile":"$[workdir]$/logs/llmengine.log"
|
||||||
|
},
|
||||||
|
"website":{
|
||||||
|
"paths":[
|
||||||
|
["$[workdir]$/wwwroot",""]
|
||||||
|
],
|
||||||
|
"client_max_size":10000,
|
||||||
|
"host":"0.0.0.0",
|
||||||
|
"port":9990,
|
||||||
|
"coding":"utf-8",
|
||||||
|
"indexes":[
|
||||||
|
"index.html",
|
||||||
|
"index.ui"
|
||||||
|
],
|
||||||
|
"startswiths":[
|
||||||
|
{
|
||||||
|
"leading":"/idfile",
|
||||||
|
"registerfunction":"idfile"
|
||||||
|
},{
|
||||||
|
"leading": "/v1/entities",
|
||||||
|
"registerfunction": "entities"
|
||||||
|
},{
|
||||||
|
"leading": "/docs",
|
||||||
|
"registerfunction": "docs"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"processors":[
|
||||||
|
[".tmpl","tmpl"],
|
||||||
|
[".app","app"],
|
||||||
|
[".ui","bui"],
|
||||||
|
[".dspy","dspy"],
|
||||||
|
[".md","md"]
|
||||||
|
],
|
||||||
|
"rsakey_oops":{
|
||||||
|
"privatekey":"$[workdir]$/conf/rsa_private_key.pem",
|
||||||
|
"publickey":"$[workdir]$/conf/rsa_public_key.pem"
|
||||||
|
},
|
||||||
|
"session_max_time":3000,
|
||||||
|
"session_issue_time":2500,
|
||||||
|
"session_redis_notuse":{
|
||||||
|
"url":"redis://127.0.0.1:6379"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
14
test/entities/entities.service
Normal file
14
test/entities/entities.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Wants=systemd-networkd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/share/run/entities
|
||||||
|
ExecStart=/share/run/entities/start.sh
|
||||||
|
ExecStop=/share/run/entities/stop.sh
|
||||||
|
StandardOutput=append:/var/log/entities/entities.log
|
||||||
|
StandardError=append:/var/log/entities/entities.log
|
||||||
|
SyslogIdentifier=entities
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
0
test/entities/logs/llmengine.log
Normal file
0
test/entities/logs/llmengine.log
Normal file
3
test/entities/start.sh
Executable file
3
test/entities/start.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CUDA_VISIBLE_DEVICES=7 /share/vllm-0.8.5/bin/python -m llmengine.entity -p 9990 /share/models/LTP/small
|
||||||
12
test/entities/stop.sh
Executable file
12
test/entities/stop.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PORT=9990
|
||||||
|
PID=$(lsof -t -i:$PORT)
|
||||||
|
|
||||||
|
if [ -n "$PID" ]; then
|
||||||
|
echo "找到端口 $PORT 的进程: PID=$PID"
|
||||||
|
kill -9 $PID
|
||||||
|
echo "已终止端口 $PORT 的进程"
|
||||||
|
else
|
||||||
|
echo "未找到端口 $PORT 的进程"
|
||||||
|
fi
|
||||||
50
test/triples/conf/config.json
Normal file
50
test/triples/conf/config.json
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"filesroot":"$[workdir]$/files",
|
||||||
|
"logger":{
|
||||||
|
"name":"llmengine",
|
||||||
|
"levelname":"info",
|
||||||
|
"logfile":"$[workdir]$/logs/llmengine.log"
|
||||||
|
},
|
||||||
|
"website":{
|
||||||
|
"paths":[
|
||||||
|
["$[workdir]$/wwwroot",""]
|
||||||
|
],
|
||||||
|
"client_max_size":10000,
|
||||||
|
"host":"0.0.0.0",
|
||||||
|
"port":9991,
|
||||||
|
"coding":"utf-8",
|
||||||
|
"indexes":[
|
||||||
|
"index.html",
|
||||||
|
"index.ui"
|
||||||
|
],
|
||||||
|
"startswiths":[
|
||||||
|
{
|
||||||
|
"leading":"/idfile",
|
||||||
|
"registerfunction":"idfile"
|
||||||
|
},{
|
||||||
|
"leading": "/v1/triples",
|
||||||
|
"registerfunction": "triples"
|
||||||
|
},{
|
||||||
|
"leading": "/docs",
|
||||||
|
"registerfunction": "docs"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"processors":[
|
||||||
|
[".tmpl","tmpl"],
|
||||||
|
[".app","app"],
|
||||||
|
[".ui","bui"],
|
||||||
|
[".dspy","dspy"],
|
||||||
|
[".md","md"]
|
||||||
|
],
|
||||||
|
"rsakey_oops":{
|
||||||
|
"privatekey":"$[workdir]$/conf/rsa_private_key.pem",
|
||||||
|
"publickey":"$[workdir]$/conf/rsa_public_key.pem"
|
||||||
|
},
|
||||||
|
"session_max_time":3000,
|
||||||
|
"session_issue_time":2500,
|
||||||
|
"session_redis_notuse":{
|
||||||
|
"url":"redis://127.0.0.1:6379"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
37
test/triples/logs/llmengine.log
Normal file
37
test/triples/logs/llmengine.log
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
2025-06-26 11:27:58,967 - INFO - Starting mREBEL Triplet Service on port 9991, model: /share/models/Babelscape/mrebel-large
|
||||||
|
2025-06-26 16:12:06,701 - INFO - Starting mREBEL Triplet Service on port 9991, model: /share/models/Babelscape/mrebel-large
|
||||||
|
2025-06-27 14:04:19,944 - INFO - Starting mREBEL Triplet Service on port 9991, model: /share/models/Babelscape/mrebel-large
|
||||||
|
2025-06-30 11:32:23,329 - INFO - Starting mREBEL Triplet Service on port 9991, model: /share/models/Babelscape/mrebel-large
|
||||||
|
2025-06-30 19:24:24,592 - INFO - Starting mREBEL Triplet Service on port 9991, model: /share/models/Babelscape/mrebel-large
|
||||||
|
2025-06-30 19:24:24,597 - ERROR - Failed to start server: '/share/run/triples/wwwroot' does not exist
|
||||||
|
2025-06-30 19:24:24,601 - DEBUG - Traceback: Traceback (most recent call last):
|
||||||
|
File "/share/vllm-0.8.5/lib/python3.10/site-packages/aiohttp/web_urldispatcher.py", line 562, in __init__
|
||||||
|
directory = Path(directory).expanduser().resolve(strict=True)
|
||||||
|
File "/usr/lib/python3.10/pathlib.py", line 1077, in resolve
|
||||||
|
s = self._accessor.realpath(self, strict=strict)
|
||||||
|
File "/usr/lib/python3.10/posixpath.py", line 396, in realpath
|
||||||
|
path, ok = _joinrealpath(filename[:0], filename, strict, {})
|
||||||
|
File "/usr/lib/python3.10/posixpath.py", line 431, in _joinrealpath
|
||||||
|
st = os.lstat(newpath)
|
||||||
|
FileNotFoundError: [Errno 2] No such file or directory: '/share/run/triples/wwwroot'
|
||||||
|
|
||||||
|
The above exception was the direct cause of the following exception:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/share/vllm-0.8.5/lib/python3.10/site-packages/llmengine/triple.py", line 127, in main
|
||||||
|
webserver(init, workdir, port)
|
||||||
|
File "/share/vllm-0.8.5/lib/python3.10/site-packages/ahserver/webapp.py", line 35, in webserver
|
||||||
|
server.run(port=port)
|
||||||
|
File "/share/vllm-0.8.5/lib/python3.10/site-packages/ahserver/configuredServer.py", line 69, in run
|
||||||
|
self.configPath(config)
|
||||||
|
File "/share/vllm-0.8.5/lib/python3.10/site-packages/ahserver/configuredServer.py", line 89, in configPath
|
||||||
|
res = ProcessorResource(prefix,p,show_index=True,
|
||||||
|
File "/share/vllm-0.8.5/lib/python3.10/site-packages/ahserver/processorResource.py", line 86, in __init__
|
||||||
|
StaticResource.__init__(self,prefix, directory,
|
||||||
|
File "/share/vllm-0.8.5/lib/python3.10/site-packages/aiohttp/web_urldispatcher.py", line 564, in __init__
|
||||||
|
raise ValueError(f"'{directory}' does not exist") from error
|
||||||
|
ValueError: '/share/run/triples/wwwroot' does not exist
|
||||||
|
|
||||||
|
2025-06-30 20:05:01,769 - INFO - Starting mREBEL Triplet Service on port 9991, model: /share/models/Babelscape/mrebel-large
|
||||||
|
2025-06-30 22:23:02,076 - INFO - Starting mREBEL Triplet Service on port 9991, model: /share/models/Babelscape/mrebel-large
|
||||||
|
2025-06-30 22:24:33,235 - INFO - Starting mREBEL Triplet Service on port 9991, model: /share/models/Babelscape/mrebel-large
|
||||||
695
test/triples/neo4j/LICENSE.txt
Normal file
695
test/triples/neo4j/LICENSE.txt
Normal file
@ -0,0 +1,695 @@
|
|||||||
|
NOTICE
|
||||||
|
This package contains software licensed under different
|
||||||
|
licenses, please refer to the NOTICE.txt file for further
|
||||||
|
information and LICENSES.txt for full license texts.
|
||||||
|
|
||||||
|
The software ("Software") developed and owned by Neo4j Sweden AB
|
||||||
|
(referred to in this notice as "Neo4j") is licensed under the
|
||||||
|
GNU GENERAL PUBLIC LICENSE Version 3 to all third
|
||||||
|
parties and that license is included below.
|
||||||
|
|
||||||
|
However, if you have executed an End User Software License and Services
|
||||||
|
Agreement or an OEM Software License and Support Services Agreement, or
|
||||||
|
another commercial license agreement with Neo4j or one of its
|
||||||
|
affiliates (each, a "Commercial Agreement"), the terms of the license in
|
||||||
|
such Commercial Agreement will supersede the GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3 and you may use the Software solely pursuant to the terms of
|
||||||
|
the relevant Commercial Agreement.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
|
|
||||||
2060
test/triples/neo4j/LICENSES.txt
Normal file
2060
test/triples/neo4j/LICENSES.txt
Normal file
File diff suppressed because it is too large
Load Diff
474
test/triples/neo4j/NOTICE.txt
Normal file
474
test/triples/neo4j/NOTICE.txt
Normal file
@ -0,0 +1,474 @@
|
|||||||
|
Neo4j
|
||||||
|
Copyright © 2002-2018 Neo4j Sweden AB (referred to in this notice as "Neo4j")
|
||||||
|
[http://neo4j.com]
|
||||||
|
|
||||||
|
This product includes software ("Software") developed by Neo4j.
|
||||||
|
|
||||||
|
The copyright in the bundled Neo4j graph database (including the
|
||||||
|
Software) is owned by Neo4j. The Software developed and owned
|
||||||
|
by Neo4j is licensed under the GNU GENERAL PUBLIC LICENSE Version 3
|
||||||
|
(http://www.fsf.org/licensing/licenses/gpl-3.0.html) ("GPL")
|
||||||
|
to all third parties and that license, as required by the GPL, is
|
||||||
|
included in the LICENSE.txt file.
|
||||||
|
|
||||||
|
However, if you have executed an End User Software License and Services
|
||||||
|
Agreement or an OEM Software License and Support Services Agreement, or
|
||||||
|
another commercial license agreement with Neo4j or one of its
|
||||||
|
affiliates (each, a "Commercial Agreement"), the terms of the license in
|
||||||
|
such Commercial Agreement will supersede the GPL and you may use the
|
||||||
|
software solely pursuant to the terms of the relevant Commercial
|
||||||
|
Agreement.
|
||||||
|
|
||||||
|
Full license texts are found in LICENSES.txt.
|
||||||
|
|
||||||
|
|
||||||
|
Third-party licenses
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Apache Software License, Version 2.0
|
||||||
|
@firebase/app
|
||||||
|
@firebase/app-types
|
||||||
|
@firebase/auth
|
||||||
|
@firebase/auth-types
|
||||||
|
@firebase/database
|
||||||
|
@firebase/database-types
|
||||||
|
@firebase/firestore
|
||||||
|
@firebase/firestore-types
|
||||||
|
@firebase/functions
|
||||||
|
@firebase/functions-types
|
||||||
|
@firebase/logger
|
||||||
|
@firebase/messaging
|
||||||
|
@firebase/messaging-types
|
||||||
|
@firebase/polyfill
|
||||||
|
@firebase/storage
|
||||||
|
@firebase/storage-types
|
||||||
|
@firebase/util
|
||||||
|
@firebase/webchannel-wrapper
|
||||||
|
Apache Commons BeanUtils
|
||||||
|
Apache Commons Codec
|
||||||
|
Apache Commons Collections
|
||||||
|
Apache Commons Compress
|
||||||
|
Apache Commons IO
|
||||||
|
Apache Commons Lang
|
||||||
|
Apache Commons Logging
|
||||||
|
Apache Commons Text
|
||||||
|
Apache Log4j API
|
||||||
|
Apache Log4j Core
|
||||||
|
Apache Shiro :: Cache
|
||||||
|
Apache Shiro :: Configuration :: Core
|
||||||
|
Apache Shiro :: Configuration :: OGDL
|
||||||
|
Apache Shiro :: Core
|
||||||
|
Apache Shiro :: Cryptography :: Ciphers
|
||||||
|
Apache Shiro :: Cryptography :: Core
|
||||||
|
Apache Shiro :: Cryptography :: Hashing
|
||||||
|
Apache Shiro :: Event
|
||||||
|
Apache Shiro :: Lang
|
||||||
|
ascli
|
||||||
|
aws-sign2
|
||||||
|
bytebuffer
|
||||||
|
Caffeine cache
|
||||||
|
caseless
|
||||||
|
detect-libc
|
||||||
|
disposables
|
||||||
|
fastinfoset
|
||||||
|
firebase
|
||||||
|
forever-agent
|
||||||
|
grpc
|
||||||
|
IPAddress
|
||||||
|
Jackson module: Old JAXB Annotations (javax.xml.bind)
|
||||||
|
Jackson-annotations
|
||||||
|
Jackson-core
|
||||||
|
jackson-databind
|
||||||
|
Jackson-JAXRS: base
|
||||||
|
Jackson-JAXRS: JSON
|
||||||
|
Jakarta Bean Validation API
|
||||||
|
Java Agent for Memory Measurements
|
||||||
|
Java Concurrency Tools Core Library
|
||||||
|
Java Native Access
|
||||||
|
Javassist
|
||||||
|
jersey-container-servlet
|
||||||
|
jersey-container-servlet-core
|
||||||
|
jersey-core-client
|
||||||
|
jersey-core-common
|
||||||
|
jersey-core-server
|
||||||
|
jersey-inject-hk2
|
||||||
|
Jettison
|
||||||
|
Jetty :: Http Utility
|
||||||
|
Jetty :: IO Utility
|
||||||
|
Jetty :: Security
|
||||||
|
Jetty :: Server Core
|
||||||
|
Jetty :: Servlet Handling
|
||||||
|
Jetty :: Utilities
|
||||||
|
Jetty :: Webapp Application Support
|
||||||
|
Jetty :: XML utilities
|
||||||
|
jPowerShell
|
||||||
|
jProcesses
|
||||||
|
long
|
||||||
|
Lucene Common Analyzers
|
||||||
|
Lucene Core
|
||||||
|
Lucene Memory
|
||||||
|
Lucene QueryParsers
|
||||||
|
magnolia
|
||||||
|
mercator
|
||||||
|
neo4j-driver
|
||||||
|
Netty/Buffer
|
||||||
|
Netty/Codec
|
||||||
|
Netty/Codec/HTTP
|
||||||
|
Netty/Common
|
||||||
|
Netty/Handler
|
||||||
|
Netty/Resolver
|
||||||
|
Netty/Transport
|
||||||
|
Netty/Transport/Classes/Epoll
|
||||||
|
Netty/Transport/Native/Epoll
|
||||||
|
Netty/Transport/Native/Unix/Common
|
||||||
|
Non-Blocking Reactive Foundation for the JVM
|
||||||
|
oauth-sign
|
||||||
|
parboiled-core
|
||||||
|
parboiled-scala
|
||||||
|
picocli - a mighty tiny Command Line Interface
|
||||||
|
protobufjs
|
||||||
|
request
|
||||||
|
rxjs
|
||||||
|
Scala Compiler
|
||||||
|
tslib
|
||||||
|
tunnel-agent
|
||||||
|
WMI4Java
|
||||||
|
|
||||||
|
BSD - Scala License
|
||||||
|
Scala Library
|
||||||
|
|
||||||
|
BSD License
|
||||||
|
antlr4
|
||||||
|
asm
|
||||||
|
asm-analysis
|
||||||
|
asm-tree
|
||||||
|
asm-util
|
||||||
|
bcrypt-pbkdf
|
||||||
|
boom
|
||||||
|
cryptiles
|
||||||
|
D3.js
|
||||||
|
dnd-core
|
||||||
|
hawk
|
||||||
|
hoek
|
||||||
|
hoist-non-react-statics
|
||||||
|
ieee754
|
||||||
|
json-schema
|
||||||
|
node-pre-gyp
|
||||||
|
qs
|
||||||
|
react-dnd
|
||||||
|
react-dnd-html5-backend
|
||||||
|
sntp
|
||||||
|
tough-cookie
|
||||||
|
Zstandard
|
||||||
|
|
||||||
|
BSD License 2-clause
|
||||||
|
tar-pack
|
||||||
|
uri-js
|
||||||
|
zstd-jni
|
||||||
|
|
||||||
|
Bouncy Castle License
|
||||||
|
Bouncy Castle ASN.1 Extension and Utility APIs
|
||||||
|
Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs
|
||||||
|
Bouncy Castle Provider
|
||||||
|
|
||||||
|
Common Development and Distribution License Version 1.1
|
||||||
|
Java Servlet API
|
||||||
|
jaxb-api
|
||||||
|
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Collections API
|
||||||
|
Eclipse Collections Main Library
|
||||||
|
Extended StAX API
|
||||||
|
fastinfoset
|
||||||
|
istack common utility code runtime
|
||||||
|
JavaBeans Activation Framework API jar
|
||||||
|
JAXB Runtime
|
||||||
|
jersey-container-servlet
|
||||||
|
jersey-container-servlet-core
|
||||||
|
jersey-core-client
|
||||||
|
jersey-inject-hk2
|
||||||
|
TXW2 Runtime
|
||||||
|
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
Eclipse Collections API
|
||||||
|
Eclipse Collections Main Library
|
||||||
|
|
||||||
|
Eclipse Public License v2.0
|
||||||
|
HK2 API module
|
||||||
|
HK2 Implementation Utilities
|
||||||
|
Jakarta Annotations API
|
||||||
|
jakarta.ws.rs-api
|
||||||
|
javax.inject:1 as OSGi bundle
|
||||||
|
javax.ws.rs-api
|
||||||
|
jersey-container-servlet
|
||||||
|
jersey-container-servlet-core
|
||||||
|
jersey-core-client
|
||||||
|
jersey-core-common
|
||||||
|
jersey-core-server
|
||||||
|
jersey-inject-hk2
|
||||||
|
ServiceLocator Default Implementation
|
||||||
|
|
||||||
|
GNU General Public License, version 2 with the Classpath Exception
|
||||||
|
Java Servlet API
|
||||||
|
|
||||||
|
ISC
|
||||||
|
abbrev
|
||||||
|
aproba
|
||||||
|
are-we-there-yet
|
||||||
|
block-stream
|
||||||
|
cliui
|
||||||
|
console-control-strings
|
||||||
|
css-color-keywords
|
||||||
|
fs.realpath
|
||||||
|
fstream
|
||||||
|
fstream-ignore
|
||||||
|
gauge
|
||||||
|
glob
|
||||||
|
graceful-fs
|
||||||
|
har-schema
|
||||||
|
har-validator
|
||||||
|
has-unicode
|
||||||
|
inflight
|
||||||
|
inherits
|
||||||
|
ini
|
||||||
|
json-stringify-safe
|
||||||
|
minimatch
|
||||||
|
nopt
|
||||||
|
npmlog
|
||||||
|
once
|
||||||
|
osenv
|
||||||
|
rimraf
|
||||||
|
semver
|
||||||
|
set-blocking
|
||||||
|
signal-exit
|
||||||
|
tar
|
||||||
|
uid-number
|
||||||
|
wide-align
|
||||||
|
wrappy
|
||||||
|
y18n
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
ajv
|
||||||
|
ansi-regex
|
||||||
|
asap
|
||||||
|
ascii-data-table
|
||||||
|
asn1
|
||||||
|
assert-plus
|
||||||
|
assertion-error
|
||||||
|
asynckit
|
||||||
|
attr-accept
|
||||||
|
aws4
|
||||||
|
babel-runtime
|
||||||
|
balanced-match
|
||||||
|
base64-js
|
||||||
|
bootstrap
|
||||||
|
brace-expansion
|
||||||
|
buffer
|
||||||
|
camelcase
|
||||||
|
canvg
|
||||||
|
chai
|
||||||
|
check-error
|
||||||
|
classnames
|
||||||
|
co
|
||||||
|
code-point-at
|
||||||
|
codemirror
|
||||||
|
colour
|
||||||
|
combined-stream
|
||||||
|
concat-map
|
||||||
|
core-js
|
||||||
|
core-util-is
|
||||||
|
css-to-react-native
|
||||||
|
dashdash
|
||||||
|
debug
|
||||||
|
decamelize
|
||||||
|
deep-eql
|
||||||
|
deep-extend
|
||||||
|
delayed-stream
|
||||||
|
delegates
|
||||||
|
dom-storage
|
||||||
|
ecc-jsbn
|
||||||
|
encoding
|
||||||
|
extend
|
||||||
|
extsprintf
|
||||||
|
fast-deep-equal
|
||||||
|
fast-json-stable-stringify
|
||||||
|
faye-websocket
|
||||||
|
fbjs
|
||||||
|
file-saver
|
||||||
|
Font Awesome CSS
|
||||||
|
form-data
|
||||||
|
fuzzaldrin
|
||||||
|
get-func-name
|
||||||
|
getpass
|
||||||
|
has-flag
|
||||||
|
http-parser-js
|
||||||
|
http-signature
|
||||||
|
iconv-lite
|
||||||
|
invariant
|
||||||
|
invert-kv
|
||||||
|
is-fullwidth-code-point
|
||||||
|
is-plain-object
|
||||||
|
is-stream
|
||||||
|
is-typedarray
|
||||||
|
isarray
|
||||||
|
isobject
|
||||||
|
isomorphic-fetch
|
||||||
|
isstream
|
||||||
|
jersey-container-servlet
|
||||||
|
jersey-container-servlet-core
|
||||||
|
jersey-core-client
|
||||||
|
jersey-inject-hk2
|
||||||
|
js-tokens
|
||||||
|
jsbn
|
||||||
|
json-schema-traverse
|
||||||
|
jsonic
|
||||||
|
jsprim
|
||||||
|
lcid
|
||||||
|
lodash
|
||||||
|
lodash-es
|
||||||
|
lodash.debounce
|
||||||
|
loose-envify
|
||||||
|
mime-db
|
||||||
|
mime-types
|
||||||
|
minimist
|
||||||
|
mkdirp
|
||||||
|
ms
|
||||||
|
nan
|
||||||
|
node-fetch
|
||||||
|
number-is-nan
|
||||||
|
object-assign
|
||||||
|
optjs
|
||||||
|
os-homedir
|
||||||
|
os-locale
|
||||||
|
os-tmpdir
|
||||||
|
path-is-absolute
|
||||||
|
pathval
|
||||||
|
performance-now
|
||||||
|
postcss-value-parser
|
||||||
|
process-nextick-args
|
||||||
|
promise
|
||||||
|
promise-polyfill
|
||||||
|
prop-types
|
||||||
|
punycode
|
||||||
|
querystringify
|
||||||
|
rc
|
||||||
|
react
|
||||||
|
react-addons-pure-render-mixin
|
||||||
|
react-dom
|
||||||
|
react-dropzone
|
||||||
|
react-icon-base
|
||||||
|
react-icons
|
||||||
|
react-is
|
||||||
|
react-redux
|
||||||
|
react-suber
|
||||||
|
react-timeago
|
||||||
|
readable-stream
|
||||||
|
redux
|
||||||
|
redux-observable
|
||||||
|
regenerator-runtime
|
||||||
|
requires-port
|
||||||
|
safe-buffer
|
||||||
|
safer-buffer
|
||||||
|
save-as
|
||||||
|
setimmediate
|
||||||
|
SLF4J API Module
|
||||||
|
SLF4J NOP Binding
|
||||||
|
sshpk
|
||||||
|
string-width
|
||||||
|
string_decoder
|
||||||
|
stringstream
|
||||||
|
strip-ansi
|
||||||
|
strip-json-comments
|
||||||
|
styled-components
|
||||||
|
stylis
|
||||||
|
stylis-rule-sheet
|
||||||
|
suber
|
||||||
|
supports-color
|
||||||
|
swipe-js-iso
|
||||||
|
symbol-observable
|
||||||
|
type-detect
|
||||||
|
ua-parser-js
|
||||||
|
url-parse
|
||||||
|
util-deprecate
|
||||||
|
uuid
|
||||||
|
verror
|
||||||
|
websocket-driver
|
||||||
|
websocket-extensions
|
||||||
|
whatwg-fetch
|
||||||
|
window-size
|
||||||
|
wrap-ansi
|
||||||
|
xmlhttprequest
|
||||||
|
yargs
|
||||||
|
|
||||||
|
MIT No Attribution License
|
||||||
|
reactive-streams
|
||||||
|
|
||||||
|
SIL OFL 1.1
|
||||||
|
Font Awesome
|
||||||
|
Inconsolata Font
|
||||||
|
Open Sans Font
|
||||||
|
|
||||||
|
Unlicense
|
||||||
|
jersey-container-servlet
|
||||||
|
jersey-container-servlet-core
|
||||||
|
jersey-core-client
|
||||||
|
jersey-core-common
|
||||||
|
jersey-inject-hk2
|
||||||
|
tweetnacl
|
||||||
|
|
||||||
|
Dependencies with multiple licenses
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
Eclipse Collections API
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
|
||||||
|
Eclipse Collections Main Library
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
|
||||||
|
Java Servlet API
|
||||||
|
Common Development and Distribution License Version 1.1
|
||||||
|
GNU General Public License, version 2 with the Classpath Exception
|
||||||
|
|
||||||
|
fastinfoset
|
||||||
|
Apache Software License, Version 2.0
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
|
||||||
|
jersey-container-servlet
|
||||||
|
Apache Software License, Version 2.0
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Public License v2.0
|
||||||
|
MIT License
|
||||||
|
Unlicense
|
||||||
|
|
||||||
|
jersey-container-servlet-core
|
||||||
|
Apache Software License, Version 2.0
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Public License v2.0
|
||||||
|
MIT License
|
||||||
|
Unlicense
|
||||||
|
|
||||||
|
jersey-core-client
|
||||||
|
Apache Software License, Version 2.0
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Public License v2.0
|
||||||
|
MIT License
|
||||||
|
Unlicense
|
||||||
|
|
||||||
|
jersey-core-common
|
||||||
|
Apache Software License, Version 2.0
|
||||||
|
Eclipse Public License v2.0
|
||||||
|
Unlicense
|
||||||
|
|
||||||
|
jersey-core-server
|
||||||
|
Apache Software License, Version 2.0
|
||||||
|
Eclipse Public License v2.0
|
||||||
|
|
||||||
|
jersey-inject-hk2
|
||||||
|
Apache Software License, Version 2.0
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Public License v2.0
|
||||||
|
MIT License
|
||||||
|
Unlicense
|
||||||
|
|
||||||
48
test/triples/neo4j/README.txt
Normal file
48
test/triples/neo4j/README.txt
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
Neo4j 4.4.36
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
Welcome to Neo4j release 4.4.36, a high-performance graph database.
|
||||||
|
This is the community distribution of Neo4j, including everything you need to
|
||||||
|
start building applications that can model, persist and explore graph-like data.
|
||||||
|
|
||||||
|
In the box
|
||||||
|
----------
|
||||||
|
|
||||||
|
Neo4j runs as a server application, exposing a Web-based management interface.
|
||||||
|
|
||||||
|
Here in the installation directory, you'll find:
|
||||||
|
|
||||||
|
* bin - scripts and other executables
|
||||||
|
* conf - server configuration
|
||||||
|
* data - databases
|
||||||
|
* lib - libraries
|
||||||
|
* plugins - user extensions
|
||||||
|
* logs - log files
|
||||||
|
* import - location of files for LOAD CSV
|
||||||
|
|
||||||
|
Make it go
|
||||||
|
----------
|
||||||
|
|
||||||
|
For full instructions, see https://neo4j.com/docs/operations-manual/current/installation/
|
||||||
|
|
||||||
|
To get started with Neo4j, let's start the server and take a
|
||||||
|
look at the web interface ...
|
||||||
|
|
||||||
|
1. Open a console and navigate to the install directory.
|
||||||
|
2. Start the server:
|
||||||
|
* Windows, use: bin\neo4j console
|
||||||
|
* Linux/Mac, use: ./bin/neo4j console
|
||||||
|
3. In a browser, open http://localhost:7474/
|
||||||
|
4. Shutdown the server by typing Ctrl-C in the console.
|
||||||
|
|
||||||
|
Learn more
|
||||||
|
----------
|
||||||
|
|
||||||
|
* Neo4j Home: https://neo4j.com/
|
||||||
|
* Getting Started: https://neo4j.com/docs/developer-manual/current/introduction/
|
||||||
|
* Neo4j Documentation: https://neo4j.com/docs/
|
||||||
|
|
||||||
|
License(s)
|
||||||
|
----------
|
||||||
|
Various licenses apply. Please refer to the LICENSE and NOTICE files for more
|
||||||
|
detailed information.
|
||||||
1
test/triples/neo4j/UPGRADE.txt
Normal file
1
test/triples/neo4j/UPGRADE.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
For upgrade instructions, please see https://neo4j.com/docs/operations-manual/current/upgrade/.
|
||||||
695
test/triples/neo4j/bin/LICENSE.txt
Executable file
695
test/triples/neo4j/bin/LICENSE.txt
Executable file
@ -0,0 +1,695 @@
|
|||||||
|
NOTICE
|
||||||
|
This package contains software licensed under different
|
||||||
|
licenses, please refer to the NOTICE.txt file for further
|
||||||
|
information and LICENSES.txt for full license texts.
|
||||||
|
|
||||||
|
The software ("Software") developed and owned by Neo4j Sweden AB
|
||||||
|
(referred to in this notice as "Neo4j") is licensed under the
|
||||||
|
GNU GENERAL PUBLIC LICENSE Version 3 to all third
|
||||||
|
parties and that license is included below.
|
||||||
|
|
||||||
|
However, if you have executed an End User Software License and Services
|
||||||
|
Agreement or an OEM Software License and Support Services Agreement, or
|
||||||
|
another commercial license agreement with Neo4j or one of its
|
||||||
|
affiliates (each, a "Commercial Agreement"), the terms of the license in
|
||||||
|
such Commercial Agreement will supersede the GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3 and you may use the Software solely pursuant to the terms of
|
||||||
|
the relevant Commercial Agreement.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
|
|
||||||
425
test/triples/neo4j/bin/LICENSES.txt
Executable file
425
test/triples/neo4j/bin/LICENSES.txt
Executable file
@ -0,0 +1,425 @@
|
|||||||
|
This file contains the full license text of the included third party
|
||||||
|
libraries. For an overview of the licenses see the NOTICE.txt file.
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
Apache Software License, Version 2.0
|
||||||
|
Apache Commons Lang
|
||||||
|
jansi
|
||||||
|
Java Agent for Memory Measurements
|
||||||
|
Java Native Access
|
||||||
|
Neo4j Java Driver (Slim package)
|
||||||
|
Netty/Buffer
|
||||||
|
Netty/Codec
|
||||||
|
Netty/Common
|
||||||
|
Netty/Handler
|
||||||
|
Netty/Resolver
|
||||||
|
Netty/Transport
|
||||||
|
Netty/Transport/Native/Unix/Common
|
||||||
|
Non-Blocking Reactive Foundation for the JVM
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
BSD License
|
||||||
|
JLine JANSI Terminal
|
||||||
|
JLine Reader
|
||||||
|
JLine Terminal
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Copyright (c) <year>, <copyright holder>
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the <organization> nor the
|
||||||
|
names of its contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||||
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Collections API
|
||||||
|
Eclipse Collections Main Library
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
|
||||||
|
Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
Neither the name of the Eclipse Foundation, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
Eclipse Collections API
|
||||||
|
Eclipse Collections Main Library
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
|
||||||
|
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||||
|
|
||||||
|
1. DEFINITIONS
|
||||||
|
|
||||||
|
"Contribution" means:
|
||||||
|
|
||||||
|
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
|
||||||
|
b) in the case of each subsequent Contributor:
|
||||||
|
i) changes to the Program, and
|
||||||
|
ii) additions to the Program;
|
||||||
|
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
|
||||||
|
"Contributor" means any person or entity that distributes the Program.
|
||||||
|
|
||||||
|
"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
|
||||||
|
|
||||||
|
"Program" means the Contributions distributed in accordance with this Agreement.
|
||||||
|
|
||||||
|
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
|
||||||
|
|
||||||
|
2. GRANT OF RIGHTS
|
||||||
|
|
||||||
|
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
|
||||||
|
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
|
||||||
|
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
|
||||||
|
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
|
||||||
|
3. REQUIREMENTS
|
||||||
|
|
||||||
|
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
|
||||||
|
|
||||||
|
a) it complies with the terms and conditions of this Agreement; and
|
||||||
|
b) its license agreement:
|
||||||
|
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
|
||||||
|
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
|
||||||
|
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
|
||||||
|
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
|
||||||
|
When the Program is made available in source code form:
|
||||||
|
|
||||||
|
a) it must be made available under this Agreement; and
|
||||||
|
b) a copy of this Agreement must be included with each copy of the Program.
|
||||||
|
Contributors may not remove or alter any copyright notices contained within the Program.
|
||||||
|
|
||||||
|
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
|
||||||
|
|
||||||
|
4. COMMERCIAL DISTRIBUTION
|
||||||
|
|
||||||
|
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
|
||||||
|
|
||||||
|
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
|
||||||
|
|
||||||
|
5. NO WARRANTY
|
||||||
|
|
||||||
|
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
|
||||||
|
|
||||||
|
6. DISCLAIMER OF LIABILITY
|
||||||
|
|
||||||
|
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
7. GENERAL
|
||||||
|
|
||||||
|
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
|
||||||
|
|
||||||
|
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
|
||||||
|
|
||||||
|
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
|
||||||
|
|
||||||
|
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
MIT License
|
||||||
|
argparse4j
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright (c) <year> <copyright holders>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
MIT No Attribution License
|
||||||
|
reactive-streams
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
MIT No Attribution
|
||||||
|
|
||||||
|
Copyright <year> <copyright holders>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
without restriction, including without limitation the rights to use, copy, modify,
|
||||||
|
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dependencies with multiple licenses
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
Eclipse Collections API
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
|
||||||
|
Eclipse Collections Main Library
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
|
||||||
72
test/triples/neo4j/bin/NOTICE.txt
Executable file
72
test/triples/neo4j/bin/NOTICE.txt
Executable file
@ -0,0 +1,72 @@
|
|||||||
|
Neo4j
|
||||||
|
Copyright © 2002-2018 Neo4j Sweden AB (referred to in this notice as "Neo4j")
|
||||||
|
[http://neo4j.com]
|
||||||
|
|
||||||
|
This product includes software ("Software") developed by Neo4j.
|
||||||
|
|
||||||
|
The copyright in the bundled Neo4j graph database (including the
|
||||||
|
Software) is owned by Neo4j. The Software developed and owned
|
||||||
|
by Neo4j is licensed under the GNU GENERAL PUBLIC LICENSE Version 3
|
||||||
|
(http://www.fsf.org/licensing/licenses/gpl-3.0.html) ("GPL")
|
||||||
|
to all third parties and that license, as required by the GPL, is
|
||||||
|
included in the LICENSE.txt file.
|
||||||
|
|
||||||
|
However, if you have executed an End User Software License and Services
|
||||||
|
Agreement or an OEM Software License and Support Services Agreement, or
|
||||||
|
another commercial license agreement with Neo4j or one of its
|
||||||
|
affiliates (each, a "Commercial Agreement"), the terms of the license in
|
||||||
|
such Commercial Agreement will supersede the GPL and you may use the
|
||||||
|
software solely pursuant to the terms of the relevant Commercial
|
||||||
|
Agreement.
|
||||||
|
|
||||||
|
Full license texts are found in LICENSES.txt.
|
||||||
|
|
||||||
|
|
||||||
|
Third-party licenses
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Apache Software License, Version 2.0
|
||||||
|
Apache Commons Lang
|
||||||
|
jansi
|
||||||
|
Java Agent for Memory Measurements
|
||||||
|
Java Native Access
|
||||||
|
Neo4j Java Driver (Slim package)
|
||||||
|
Netty/Buffer
|
||||||
|
Netty/Codec
|
||||||
|
Netty/Common
|
||||||
|
Netty/Handler
|
||||||
|
Netty/Resolver
|
||||||
|
Netty/Transport
|
||||||
|
Netty/Transport/Native/Unix/Common
|
||||||
|
Non-Blocking Reactive Foundation for the JVM
|
||||||
|
|
||||||
|
BSD License
|
||||||
|
JLine JANSI Terminal
|
||||||
|
JLine Reader
|
||||||
|
JLine Terminal
|
||||||
|
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Collections API
|
||||||
|
Eclipse Collections Main Library
|
||||||
|
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
Eclipse Collections API
|
||||||
|
Eclipse Collections Main Library
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
argparse4j
|
||||||
|
|
||||||
|
MIT No Attribution License
|
||||||
|
reactive-streams
|
||||||
|
|
||||||
|
Dependencies with multiple licenses
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
Eclipse Collections API
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
|
||||||
|
Eclipse Collections Main Library
|
||||||
|
Eclipse Distribution License - v 1.0
|
||||||
|
Eclipse Public License - v 1.0
|
||||||
|
|
||||||
96
test/triples/neo4j/bin/cypher-shell
Executable file
96
test/triples/neo4j/bin/cypher-shell
Executable file
@ -0,0 +1,96 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
[[ "${TRACE:-}" ]] && set -x
|
||||||
|
|
||||||
|
check_java() {
|
||||||
|
_find_java_cmd
|
||||||
|
|
||||||
|
version_command=("${JAVA_CMD}" "-version")
|
||||||
|
[[ -n "${JAVA_MEMORY_OPTS:-}" ]] && version_command+=("${JAVA_MEMORY_OPTS[@]}")
|
||||||
|
|
||||||
|
JAVA_VERSION=$("${version_command[@]}" 2>&1 | awk -F '"' '/version/ {print $2}')
|
||||||
|
if [[ $JAVA_VERSION = "1."* ]]; then
|
||||||
|
if [[ "${JAVA_VERSION}" < "1.8" ]]; then
|
||||||
|
echo "ERROR! Java version ${JAVA_VERSION} is not supported. "
|
||||||
|
_show_java_help
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_find_java_cmd() {
|
||||||
|
[[ "${JAVA_CMD:-}" ]] && return
|
||||||
|
detect_os
|
||||||
|
_find_java_home
|
||||||
|
|
||||||
|
if [[ "${JAVA_HOME:-}" ]] ; then
|
||||||
|
JAVA_CMD="${JAVA_HOME}/bin/java"
|
||||||
|
if [[ ! -f "${JAVA_CMD}" ]]; then
|
||||||
|
echo "ERROR: JAVA_HOME is incorrectly defined as ${JAVA_HOME} (the executable ${JAVA_CMD} does not exist)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "${DIST_OS}" != "macosx" ] ; then
|
||||||
|
# Don't use default java on Darwin because it displays a misleading dialog box
|
||||||
|
JAVA_CMD="$(which java || true)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! "${JAVA_CMD:-}" ]]; then
|
||||||
|
echo "ERROR: Unable to find Java executable."
|
||||||
|
_show_java_help
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
detect_os() {
|
||||||
|
if uname -s | grep -q Darwin; then
|
||||||
|
DIST_OS="macosx"
|
||||||
|
elif [[ -e /etc/gentoo-release ]]; then
|
||||||
|
DIST_OS="gentoo"
|
||||||
|
else
|
||||||
|
DIST_OS="other"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_find_java_home() {
|
||||||
|
[[ "${JAVA_HOME:-}" ]] && return
|
||||||
|
|
||||||
|
case "${DIST_OS}" in
|
||||||
|
"macosx")
|
||||||
|
JAVA_HOME="$(/usr/libexec/java_home -v 1.8+)"
|
||||||
|
;;
|
||||||
|
"gentoo")
|
||||||
|
JAVA_HOME="$(java-config --jre-home)"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
_show_java_help() {
|
||||||
|
echo "* Please use Oracle(R) Java(TM) >=8 or OpenJDK(TM) >=8."
|
||||||
|
}
|
||||||
|
|
||||||
|
build_classpath() {
|
||||||
|
APP_HOME="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
# First try in sub directory
|
||||||
|
JARPATH="$(find "${APP_HOME}" -name "cypher-shell.jar" )"
|
||||||
|
|
||||||
|
# Then try installation directory (prefix/bin and prefix/share/cypher-shell/lib)
|
||||||
|
if [[ -z "${JARPATH}" ]]; then
|
||||||
|
APP_HOME="${APP_HOME}/../share/cypher-shell"
|
||||||
|
JARPATH="$(find "${APP_HOME}" -name "cypher-shell.jar" )"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_java
|
||||||
|
build_classpath
|
||||||
|
|
||||||
|
if [ -z "${JARPATH}" ]; then
|
||||||
|
echo "Unable to locate cypher-shell library files" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVA_CMD" ${JAVA_OPTS:-} \
|
||||||
|
-jar "$JARPATH" \
|
||||||
|
"$@"
|
||||||
128
test/triples/neo4j/bin/neo4j
Executable file
128
test/triples/neo4j/bin/neo4j
Executable file
@ -0,0 +1,128 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
# Copyright (c) "Neo4j"
|
||||||
|
# Neo4j Sweden AB [http://neo4j.com]
|
||||||
|
#
|
||||||
|
# This file is part of Neo4j.
|
||||||
|
#
|
||||||
|
# Neo4j is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ]; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
BASEDIR=`cd "$PRGDIR/.." >/dev/null; pwd`
|
||||||
|
|
||||||
|
# Reset the REPO variable. If you need to influence this use the environment setup file.
|
||||||
|
REPO=
|
||||||
|
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false;
|
||||||
|
darwin=false;
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true ;;
|
||||||
|
Darwin*) darwin=true
|
||||||
|
if [ -z "$JAVA_VERSION" ] ; then
|
||||||
|
JAVA_VERSION="CurrentJDK"
|
||||||
|
else
|
||||||
|
echo "Using Java version: $JAVA_VERSION"
|
||||||
|
fi
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
if [ -x "/usr/libexec/java_home" ]; then
|
||||||
|
JAVA_HOME=`/usr/libexec/java_home`
|
||||||
|
else
|
||||||
|
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
if [ -r /etc/gentoo-release ] ; then
|
||||||
|
JAVA_HOME=`java-config --jre-home`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If a specific java binary isn't specified search for the standard 'java' binary
|
||||||
|
if [ -z "$JAVACMD" ] ; then
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD=`which java`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
echo "Error: JAVA_HOME is not defined correctly." 1>&2
|
||||||
|
echo " We cannot execute $JAVACMD" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$REPO" ]
|
||||||
|
then
|
||||||
|
REPO="$BASEDIR"/repo
|
||||||
|
fi
|
||||||
|
|
||||||
|
CLASSPATH="$BASEDIR"/etc:"$REPO"/*
|
||||||
|
|
||||||
|
ENDORSED_DIR=lib
|
||||||
|
if [ -n "$ENDORSED_DIR" ] ; then
|
||||||
|
CLASSPATH=$BASEDIR/$ENDORSED_DIR/*:$CLASSPATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$CLASSPATH_PREFIX" ] ; then
|
||||||
|
CLASSPATH=$CLASSPATH_PREFIX:$CLASSPATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||||
|
[ -n "$HOME" ] && HOME=`cygpath --path --windows "$HOME"`
|
||||||
|
[ -n "$BASEDIR" ] && BASEDIR=`cygpath --path --windows "$BASEDIR"`
|
||||||
|
[ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVACMD" -Xmx128m \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
-Dapp.name="neo4j" \
|
||||||
|
-Dapp.pid="$$" \
|
||||||
|
-Dapp.repo="$REPO" \
|
||||||
|
-Dapp.home="$BASEDIR" \
|
||||||
|
-Dbasedir="$BASEDIR" \
|
||||||
|
org.neo4j.server.startup.Neo4jBoot \
|
||||||
|
"$@"
|
||||||
128
test/triples/neo4j/bin/neo4j-admin
Executable file
128
test/triples/neo4j/bin/neo4j-admin
Executable file
@ -0,0 +1,128 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
# Copyright (c) "Neo4j"
|
||||||
|
# Neo4j Sweden AB [http://neo4j.com]
|
||||||
|
#
|
||||||
|
# This file is part of Neo4j.
|
||||||
|
#
|
||||||
|
# Neo4j is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ]; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
BASEDIR=`cd "$PRGDIR/.." >/dev/null; pwd`
|
||||||
|
|
||||||
|
# Reset the REPO variable. If you need to influence this use the environment setup file.
|
||||||
|
REPO=
|
||||||
|
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false;
|
||||||
|
darwin=false;
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true ;;
|
||||||
|
Darwin*) darwin=true
|
||||||
|
if [ -z "$JAVA_VERSION" ] ; then
|
||||||
|
JAVA_VERSION="CurrentJDK"
|
||||||
|
else
|
||||||
|
echo "Using Java version: $JAVA_VERSION"
|
||||||
|
fi
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
if [ -x "/usr/libexec/java_home" ]; then
|
||||||
|
JAVA_HOME=`/usr/libexec/java_home`
|
||||||
|
else
|
||||||
|
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
if [ -r /etc/gentoo-release ] ; then
|
||||||
|
JAVA_HOME=`java-config --jre-home`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If a specific java binary isn't specified search for the standard 'java' binary
|
||||||
|
if [ -z "$JAVACMD" ] ; then
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD=`which java`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
echo "Error: JAVA_HOME is not defined correctly." 1>&2
|
||||||
|
echo " We cannot execute $JAVACMD" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$REPO" ]
|
||||||
|
then
|
||||||
|
REPO="$BASEDIR"/repo
|
||||||
|
fi
|
||||||
|
|
||||||
|
CLASSPATH="$BASEDIR"/etc:"$REPO"/*
|
||||||
|
|
||||||
|
ENDORSED_DIR=lib
|
||||||
|
if [ -n "$ENDORSED_DIR" ] ; then
|
||||||
|
CLASSPATH=$BASEDIR/$ENDORSED_DIR/*:$CLASSPATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$CLASSPATH_PREFIX" ] ; then
|
||||||
|
CLASSPATH=$CLASSPATH_PREFIX:$CLASSPATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||||
|
[ -n "$HOME" ] && HOME=`cygpath --path --windows "$HOME"`
|
||||||
|
[ -n "$BASEDIR" ] && BASEDIR=`cygpath --path --windows "$BASEDIR"`
|
||||||
|
[ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVACMD" -Xmx128m \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
-Dapp.name="neo4j-admin" \
|
||||||
|
-Dapp.pid="$$" \
|
||||||
|
-Dapp.repo="$REPO" \
|
||||||
|
-Dapp.home="$BASEDIR" \
|
||||||
|
-Dbasedir="$BASEDIR" \
|
||||||
|
org.neo4j.server.startup.Neo4jAdminBoot \
|
||||||
|
"$@"
|
||||||
BIN
test/triples/neo4j/bin/tools/cypher-shell.jar
Normal file
BIN
test/triples/neo4j/bin/tools/cypher-shell.jar
Normal file
Binary file not shown.
360
test/triples/neo4j/conf/neo4j.conf
Normal file
360
test/triples/neo4j/conf/neo4j.conf
Normal file
@ -0,0 +1,360 @@
|
|||||||
|
#*****************************************************************
|
||||||
|
# Neo4j configuration
|
||||||
|
#
|
||||||
|
# For more details and a complete list of settings, please see
|
||||||
|
# https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/
|
||||||
|
#*****************************************************************
|
||||||
|
|
||||||
|
# The name of the default database
|
||||||
|
#dbms.default_database=neo4j
|
||||||
|
|
||||||
|
# Paths of directories in the installation.
|
||||||
|
#dbms.directories.data=data
|
||||||
|
#dbms.directories.plugins=plugins
|
||||||
|
#dbms.directories.logs=logs
|
||||||
|
#dbms.directories.lib=lib
|
||||||
|
#dbms.directories.run=run
|
||||||
|
#dbms.directories.licenses=licenses
|
||||||
|
#dbms.directories.transaction.logs.root=data/transactions
|
||||||
|
|
||||||
|
# This setting constrains all `LOAD CSV` import files to be under the `import` directory. Remove or comment it out to
|
||||||
|
# allow files to be loaded from anywhere in the filesystem; this introduces possible security problems. See the
|
||||||
|
# `LOAD CSV` section of the manual for details.
|
||||||
|
#dbms.directories.import=import
|
||||||
|
|
||||||
|
# Whether requests to Neo4j are authenticated.
|
||||||
|
# To disable authentication, uncomment this line
|
||||||
|
#dbms.security.auth_enabled=false
|
||||||
|
|
||||||
|
# Enable this to be able to upgrade a store from an older version.
|
||||||
|
#dbms.allow_upgrade=true
|
||||||
|
|
||||||
|
#********************************************************************
|
||||||
|
# Memory Settings
|
||||||
|
#********************************************************************
|
||||||
|
#
|
||||||
|
# Memory settings are specified kilobytes with the 'k' suffix, megabytes with
|
||||||
|
# 'm' and gigabytes with 'g'.
|
||||||
|
# If Neo4j is running on a dedicated server, then it is generally recommended
|
||||||
|
# to leave about 2-4 gigabytes for the operating system, give the JVM enough
|
||||||
|
# heap to hold all your transaction state and query context, and then leave the
|
||||||
|
# rest for the page cache.
|
||||||
|
|
||||||
|
# Java Heap Size: by default the Java heap size is dynamically calculated based
|
||||||
|
# on available system resources. Uncomment these lines to set specific initial
|
||||||
|
# and maximum heap size.
|
||||||
|
#dbms.memory.heap.initial_size=512m
|
||||||
|
#dbms.memory.heap.max_size=512m
|
||||||
|
|
||||||
|
# The amount of memory to use for mapping the store files.
|
||||||
|
# The default page cache memory assumes the machine is dedicated to running
|
||||||
|
# Neo4j, and is heuristically set to 50% of RAM minus the Java heap size.
|
||||||
|
#dbms.memory.pagecache.size=10g
|
||||||
|
|
||||||
|
# Limit the amount of memory that all of the running transaction can consume.
|
||||||
|
# By default there is no limit.
|
||||||
|
#dbms.memory.transaction.global_max_size=256m
|
||||||
|
|
||||||
|
# Limit the amount of memory that a single transaction can consume.
|
||||||
|
# By default there is no limit.
|
||||||
|
#dbms.memory.transaction.max_size=16m
|
||||||
|
|
||||||
|
# Transaction state location. It is recommended to use ON_HEAP.
|
||||||
|
dbms.tx_state.memory_allocation=ON_HEAP
|
||||||
|
|
||||||
|
#*****************************************************************
|
||||||
|
# Network connector configuration
|
||||||
|
#*****************************************************************
|
||||||
|
|
||||||
|
# With default configuration Neo4j only accepts local connections.
|
||||||
|
# To accept non-local connections, uncomment this line:
|
||||||
|
dbms.default_listen_address=10.18.34.18
|
||||||
|
dbms.connectors.default_listen_address=0.0.0.0
|
||||||
|
|
||||||
|
# You can also choose a specific network interface, and configure a non-default
|
||||||
|
# port for each connector, by setting their individual listen_address.
|
||||||
|
|
||||||
|
# The address at which this server can be reached by its clients. This may be the server's IP address or DNS name, or
|
||||||
|
# it may be the address of a reverse proxy which sits in front of the server. This setting may be overridden for
|
||||||
|
# individual connectors below.
|
||||||
|
#dbms.default_advertised_address=localhost
|
||||||
|
|
||||||
|
# You can also choose a specific advertised hostname or IP address, and
|
||||||
|
# configure an advertised port for each connector, by setting their
|
||||||
|
# individual advertised_address.
|
||||||
|
|
||||||
|
# By default, encryption is turned off.
|
||||||
|
# To turn on encryption, an ssl policy for the connector needs to be configured
|
||||||
|
# Read more in SSL policy section in this file for how to define a SSL policy.
|
||||||
|
|
||||||
|
# Bolt connector
|
||||||
|
dbms.connector.bolt.enabled=true
|
||||||
|
#dbms.connector.bolt.tls_level=DISABLED
|
||||||
|
dbms.connector.bolt.listen_address=:7687
|
||||||
|
#dbms.connector.bolt.advertised_address=:7687
|
||||||
|
|
||||||
|
# HTTP Connector. There can be zero or one HTTP connectors.
|
||||||
|
dbms.connector.http.enabled=true
|
||||||
|
dbms.connector.http.listen_address=:7474
|
||||||
|
#dbms.connector.http.advertised_address=:7474
|
||||||
|
|
||||||
|
# HTTPS Connector. There can be zero or one HTTPS connectors.
|
||||||
|
dbms.connector.https.enabled=false
|
||||||
|
dbms.connector.https.listen_address=:7473
|
||||||
|
#dbms.connector.https.advertised_address=:7473
|
||||||
|
|
||||||
|
# Number of Neo4j worker threads.
|
||||||
|
#dbms.threads.worker_count=
|
||||||
|
|
||||||
|
#*****************************************************************
|
||||||
|
# SSL policy configuration
|
||||||
|
#*****************************************************************
|
||||||
|
|
||||||
|
# Each policy is configured under a separate namespace, e.g.
|
||||||
|
# dbms.ssl.policy.<scope>.*
|
||||||
|
# <scope> can be any of 'bolt', 'https', 'cluster' or 'backup'
|
||||||
|
#
|
||||||
|
# The scope is the name of the component where the policy will be used
|
||||||
|
# Each component where the use of an ssl policy is desired needs to declare at least one setting of the policy.
|
||||||
|
# Allowable values are 'bolt', 'https', 'cluster' or 'backup'.
|
||||||
|
|
||||||
|
# E.g if bolt and https connectors should use the same policy, the following could be declared
|
||||||
|
# dbms.ssl.policy.bolt.base_directory=certificates/default
|
||||||
|
# dbms.ssl.policy.https.base_directory=certificates/default
|
||||||
|
# However, it's strongly encouraged to not use the same key pair for multiple scopes.
|
||||||
|
#
|
||||||
|
# N.B: Note that a connector must be configured to support/require
|
||||||
|
# SSL/TLS for the policy to actually be utilized.
|
||||||
|
#
|
||||||
|
# see: dbms.connector.*.tls_level
|
||||||
|
|
||||||
|
# SSL settings (dbms.ssl.policy.<scope>.*)
|
||||||
|
# .base_directory Base directory for SSL policies paths. All relative paths within the
|
||||||
|
# SSL configuration will be resolved from the base dir.
|
||||||
|
#
|
||||||
|
# .private_key A path to the key file relative to the '.base_directory'.
|
||||||
|
#
|
||||||
|
# .private_key_password The password for the private key.
|
||||||
|
#
|
||||||
|
# .public_certificate A path to the public certificate file relative to the '.base_directory'.
|
||||||
|
#
|
||||||
|
# .trusted_dir A path to a directory containing trusted certificates.
|
||||||
|
#
|
||||||
|
# .revoked_dir Path to the directory with Certificate Revocation Lists (CRLs).
|
||||||
|
#
|
||||||
|
# .verify_hostname If true, the server will verify the hostname that the client uses to connect with. In order
|
||||||
|
# for this to work, the server public certificate must have a valid CN and/or matching
|
||||||
|
# Subject Alternative Names.
|
||||||
|
#
|
||||||
|
# .client_auth How the client should be authorized. Possible values are: 'none', 'optional', 'require'.
|
||||||
|
#
|
||||||
|
# .tls_versions A comma-separated list of allowed TLS versions. By default only TLSv1.2 is allowed.
|
||||||
|
#
|
||||||
|
# .trust_all Setting this to 'true' will ignore the trust truststore, trusting all clients and servers.
|
||||||
|
# Use of this mode is discouraged. It would offer encryption but no security.
|
||||||
|
#
|
||||||
|
# .ciphers A comma-separated list of allowed ciphers. The default ciphers are the defaults of
|
||||||
|
# the JVM platform.
|
||||||
|
|
||||||
|
# Bolt SSL configuration
|
||||||
|
#dbms.ssl.policy.bolt.enabled=true
|
||||||
|
#dbms.ssl.policy.bolt.base_directory=certificates/bolt
|
||||||
|
#dbms.ssl.policy.bolt.private_key=private.key
|
||||||
|
#dbms.ssl.policy.bolt.public_certificate=public.crt
|
||||||
|
#dbms.ssl.policy.bolt.client_auth=NONE
|
||||||
|
|
||||||
|
# Https SSL configuration
|
||||||
|
#dbms.ssl.policy.https.enabled=true
|
||||||
|
#dbms.ssl.policy.https.base_directory=certificates/https
|
||||||
|
#dbms.ssl.policy.https.private_key=private.key
|
||||||
|
#dbms.ssl.policy.https.public_certificate=public.crt
|
||||||
|
#dbms.ssl.policy.https.client_auth=NONE
|
||||||
|
|
||||||
|
# Cluster SSL configuration
|
||||||
|
#dbms.ssl.policy.cluster.enabled=true
|
||||||
|
#dbms.ssl.policy.cluster.base_directory=certificates/cluster
|
||||||
|
#dbms.ssl.policy.cluster.private_key=private.key
|
||||||
|
#dbms.ssl.policy.cluster.public_certificate=public.crt
|
||||||
|
|
||||||
|
# Backup SSL configuration
|
||||||
|
#dbms.ssl.policy.backup.enabled=true
|
||||||
|
#dbms.ssl.policy.backup.base_directory=certificates/backup
|
||||||
|
#dbms.ssl.policy.backup.private_key=private.key
|
||||||
|
#dbms.ssl.policy.backup.public_certificate=public.crt
|
||||||
|
|
||||||
|
#*****************************************************************
|
||||||
|
# Logging configuration
|
||||||
|
#*****************************************************************
|
||||||
|
|
||||||
|
# To enable HTTP logging, uncomment this line
|
||||||
|
#dbms.logs.http.enabled=true
|
||||||
|
|
||||||
|
# Number of HTTP logs to keep.
|
||||||
|
#dbms.logs.http.rotation.keep_number=5
|
||||||
|
|
||||||
|
# Size of each HTTP log that is kept.
|
||||||
|
#dbms.logs.http.rotation.size=20m
|
||||||
|
|
||||||
|
# To enable GC Logging, uncomment this line
|
||||||
|
#dbms.logs.gc.enabled=true
|
||||||
|
|
||||||
|
# GC Logging Options
|
||||||
|
# see https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID-BE93ABDC-999C-4CB5-A88B-1994AAAC74D5
|
||||||
|
#dbms.logs.gc.options=-Xlog:gc*,safepoint,age*=trace
|
||||||
|
|
||||||
|
# Number of GC logs to keep.
|
||||||
|
#dbms.logs.gc.rotation.keep_number=5
|
||||||
|
|
||||||
|
# Size of each GC log that is kept.
|
||||||
|
#dbms.logs.gc.rotation.size=20m
|
||||||
|
|
||||||
|
# Log level for the debug log. One of DEBUG, INFO, WARN and ERROR. Be aware that logging at DEBUG level can be very verbose.
|
||||||
|
#dbms.logs.debug.level=INFO
|
||||||
|
|
||||||
|
# Size threshold for rotation of the debug log. If set to zero then no rotation will occur. Accepts a binary suffix "k",
|
||||||
|
# "m" or "g".
|
||||||
|
#dbms.logs.debug.rotation.size=20m
|
||||||
|
|
||||||
|
# Maximum number of history files for the internal log.
|
||||||
|
#dbms.logs.debug.rotation.keep_number=7
|
||||||
|
|
||||||
|
#*****************************************************************
|
||||||
|
# Miscellaneous configuration
|
||||||
|
#*****************************************************************
|
||||||
|
|
||||||
|
# Enable this to specify a parser other than the default one.
|
||||||
|
#cypher.default_language_version=3.5
|
||||||
|
|
||||||
|
# Determines if Cypher will allow using file URLs when loading data using
|
||||||
|
# `LOAD CSV`. Setting this value to `false` will cause Neo4j to fail `LOAD CSV`
|
||||||
|
# clauses that load data from the file system.
|
||||||
|
dbms.security.allow_csv_import_from_file_urls=true
|
||||||
|
|
||||||
|
|
||||||
|
# Value of the Access-Control-Allow-Origin header sent over any HTTP or HTTPS
|
||||||
|
# connector. This defaults to '*', which allows broadest compatibility. Note
|
||||||
|
# that any URI provided here limits HTTP/HTTPS access to that URI only.
|
||||||
|
#dbms.security.http_access_control_allow_origin=*
|
||||||
|
|
||||||
|
# Value of the HTTP Strict-Transport-Security (HSTS) response header. This header
|
||||||
|
# tells browsers that a webpage should only be accessed using HTTPS instead of HTTP.
|
||||||
|
# It is attached to every HTTPS response. Setting is not set by default so
|
||||||
|
# 'Strict-Transport-Security' header is not sent. Value is expected to contain
|
||||||
|
# directives like 'max-age', 'includeSubDomains' and 'preload'.
|
||||||
|
#dbms.security.http_strict_transport_security=
|
||||||
|
|
||||||
|
# Retention policy for transaction logs needed to perform recovery and backups.
|
||||||
|
dbms.tx_log.rotation.retention_policy=1 days
|
||||||
|
|
||||||
|
# Whether or not any database on this instance are read_only by default.
|
||||||
|
# If false, individual databases may be marked as read_only using dbms.database.read_only.
|
||||||
|
# If true, individual databases may be marked as writable using dbms.databases.writable.
|
||||||
|
#dbms.databases.default_to_read_only=false
|
||||||
|
|
||||||
|
# Comma separated list of JAX-RS packages containing JAX-RS resources, one
|
||||||
|
# package name for each mountpoint. The listed package names will be loaded
|
||||||
|
# under the mountpoints specified. Uncomment this line to mount the
|
||||||
|
# org.neo4j.examples.server.unmanaged.HelloWorldResource.java from
|
||||||
|
# neo4j-server-examples under /examples/unmanaged, resulting in a final URL of
|
||||||
|
# http://localhost:7474/examples/unmanaged/helloworld/{nodeId}
|
||||||
|
#dbms.unmanaged_extension_classes=org.neo4j.examples.server.unmanaged=/examples/unmanaged
|
||||||
|
|
||||||
|
# A comma separated list of procedures and user defined functions that are allowed
|
||||||
|
# full access to the database through unsupported/insecure internal APIs.
|
||||||
|
dbms.security.procedures.unrestricted=apoc.*
|
||||||
|
|
||||||
|
# A comma separated list of procedures to be loaded by default.
|
||||||
|
# Leaving this unconfigured will load all procedures found.
|
||||||
|
#dbms.security.procedures.allowlist=apoc.coll.*,apoc.load.*,gds.*
|
||||||
|
|
||||||
|
#********************************************************************
|
||||||
|
# JVM Parameters
|
||||||
|
#********************************************************************
|
||||||
|
|
||||||
|
# G1GC generally strikes a good balance between throughput and tail
|
||||||
|
# latency, without too much tuning.
|
||||||
|
dbms.jvm.additional=-XX:+UseG1GC
|
||||||
|
|
||||||
|
# Have common exceptions keep producing stack traces, so they can be
|
||||||
|
# debugged regardless of how often logs are rotated.
|
||||||
|
dbms.jvm.additional=-XX:-OmitStackTraceInFastThrow
|
||||||
|
|
||||||
|
# Make sure that `initmemory` is not only allocated, but committed to
|
||||||
|
# the process, before starting the database. This reduces memory
|
||||||
|
# fragmentation, increasing the effectiveness of transparent huge
|
||||||
|
# pages. It also reduces the possibility of seeing performance drop
|
||||||
|
# due to heap-growing GC events, where a decrease in available page
|
||||||
|
# cache leads to an increase in mean IO response time.
|
||||||
|
# Try reducing the heap memory, if this flag degrades performance.
|
||||||
|
dbms.jvm.additional=-XX:+AlwaysPreTouch
|
||||||
|
|
||||||
|
# Trust that non-static final fields are really final.
|
||||||
|
# This allows more optimizations and improves overall performance.
|
||||||
|
# NOTE: Disable this if you use embedded mode, or have extensions or dependencies that may use reflection or
|
||||||
|
# serialization to change the value of final fields!
|
||||||
|
dbms.jvm.additional=-XX:+UnlockExperimentalVMOptions
|
||||||
|
dbms.jvm.additional=-XX:+TrustFinalNonStaticFields
|
||||||
|
|
||||||
|
# Disable explicit garbage collection, which is occasionally invoked by the JDK itself.
|
||||||
|
dbms.jvm.additional=-XX:+DisableExplicitGC
|
||||||
|
|
||||||
|
#Increase maximum number of nested calls that can be inlined from 9 (default) to 15
|
||||||
|
dbms.jvm.additional=-XX:MaxInlineLevel=15
|
||||||
|
|
||||||
|
# Disable biased locking
|
||||||
|
dbms.jvm.additional=-XX:-UseBiasedLocking
|
||||||
|
|
||||||
|
# Restrict size of cached JDK buffers to 256 KB
|
||||||
|
dbms.jvm.additional=-Djdk.nio.maxCachedBufferSize=262144
|
||||||
|
|
||||||
|
# More efficient buffer allocation in Netty by allowing direct no cleaner buffers.
|
||||||
|
dbms.jvm.additional=-Dio.netty.tryReflectionSetAccessible=true
|
||||||
|
|
||||||
|
# Exits JVM on the first occurrence of an out-of-memory error. Its preferable to restart VM in case of out of memory errors.
|
||||||
|
# dbms.jvm.additional=-XX:+ExitOnOutOfMemoryError
|
||||||
|
|
||||||
|
# Expand Diffie Hellman (DH) key size from default 1024 to 2048 for DH-RSA cipher suites used in server TLS handshakes.
|
||||||
|
# This is to protect the server from any potential passive eavesdropping.
|
||||||
|
dbms.jvm.additional=-Djdk.tls.ephemeralDHKeySize=2048
|
||||||
|
|
||||||
|
# This mitigates a DDoS vector.
|
||||||
|
dbms.jvm.additional=-Djdk.tls.rejectClientInitiatedRenegotiation=true
|
||||||
|
|
||||||
|
# Enable remote debugging
|
||||||
|
#dbms.jvm.additional=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
|
||||||
|
|
||||||
|
# This filter prevents deserialization of arbitrary objects via java object serialization, addressing potential vulnerabilities.
|
||||||
|
# By default this filter whitelists all neo4j classes, as well as classes from the hazelcast library and the java standard library.
|
||||||
|
# These defaults should only be modified by expert users!
|
||||||
|
# For more details (including filter syntax) see: https://openjdk.java.net/jeps/290
|
||||||
|
#dbms.jvm.additional=-Djdk.serialFilter=java.**;org.neo4j.**;com.neo4j.**;com.hazelcast.**;net.sf.ehcache.Element;com.sun.proxy.*;org.openjdk.jmh.**;!*
|
||||||
|
|
||||||
|
# Increase the default flight recorder stack sampling depth from 64 to 256, to avoid truncating frames when profiling.
|
||||||
|
dbms.jvm.additional=-XX:FlightRecorderOptions=stackdepth=256
|
||||||
|
|
||||||
|
# Allow profilers to sample between safepoints. Without this, sampling profilers may produce less accurate results.
|
||||||
|
dbms.jvm.additional=-XX:+UnlockDiagnosticVMOptions
|
||||||
|
dbms.jvm.additional=-XX:+DebugNonSafepoints
|
||||||
|
|
||||||
|
# Disable logging JMX endpoint.
|
||||||
|
dbms.jvm.additional=-Dlog4j2.disable.jmx=true
|
||||||
|
|
||||||
|
# Limit JVM metaspace and code cache to allow garbage collection. Used by cypher for code generation and may grow indefinitely unless constrained.
|
||||||
|
# Useful for memory constrained environments
|
||||||
|
#dbms.jvm.additional=-XX:MaxMetaspaceSize=1024m
|
||||||
|
#dbms.jvm.additional=-XX:ReservedCodeCacheSize=512m
|
||||||
|
|
||||||
|
#********************************************************************
|
||||||
|
# Wrapper Windows NT/2000/XP Service Properties
|
||||||
|
#********************************************************************
|
||||||
|
# WARNING - Do not modify any of these properties when an application
|
||||||
|
# using this configuration file has been installed as a service.
|
||||||
|
# Please uninstall the service before modifying this section. The
|
||||||
|
# service can then be reinstalled.
|
||||||
|
|
||||||
|
# Name of the service
|
||||||
|
dbms.windows_service_name=neo4j
|
||||||
|
|
||||||
|
#********************************************************************
|
||||||
|
# Other Neo4j system properties
|
||||||
|
#********************************************************************
|
||||||
BIN
test/triples/neo4j/data/databases/neo4j/neostore
Normal file
BIN
test/triples/neo4j/data/databases/neo4j/neostore
Normal file
Binary file not shown.
BIN
test/triples/neo4j/data/databases/neo4j/neostore.counts.db
Normal file
BIN
test/triples/neo4j/data/databases/neo4j/neostore.counts.db
Normal file
Binary file not shown.
BIN
test/triples/neo4j/data/databases/neo4j/neostore.indexstats.db
Normal file
BIN
test/triples/neo4j/data/databases/neo4j/neostore.indexstats.db
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
test/triples/neo4j/data/databases/neo4j/neostore.nodestore.db
Normal file
BIN
test/triples/neo4j/data/databases/neo4j/neostore.nodestore.db
Normal file
Binary file not shown.
BIN
test/triples/neo4j/data/databases/neo4j/neostore.nodestore.db.id
Normal file
BIN
test/triples/neo4j/data/databases/neo4j/neostore.nodestore.db.id
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user