43 lines
1.3 KiB
Python
43 lines
1.3 KiB
Python
from dotenv import load_dotenv
|
|
import os
|
|
import sys
|
|
from app.common.elastic_helper import ElasticHelper
|
|
|
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
|
|
|
load_dotenv(dotenv_path=r"D:\init_mahdi\dataParsers\config.env")
|
|
|
|
host = os.getenv("HOST_160")
|
|
password = os.getenv("HOST_160_PASS")
|
|
elastic = ElasticHelper(es_url=host, es_pass=password, es_user="elastic")
|
|
|
|
elastic.exportToJsonForAI(
|
|
path_back=r"D:\init_mahdi\dataParsers\data",
|
|
index_name="mj_qa_conflict",
|
|
out_name="yes_rt_100_data.json",
|
|
body={
|
|
# "query": {"range": {"conflict_rank.subject_unity_bayes": {"lte": -15}}},
|
|
# "query": {"range": {"conflict_rank.subject_unity_bayes": {"gte": 71}}},
|
|
# "query": {"range": {"conflict_rank.conflict_detection_bayes": {"gte": 50}}},
|
|
# "query": {"range": {"conflict_rank.conflict_detection_bayes": {"lte": -52}}},
|
|
# "query": {"range": {"conflict_rank.relation_identification_bayes": {"lte": -20}}},
|
|
"query": {"range": {"conflict_rank.relation_identification_bayes": {"gte": 85}}},
|
|
},
|
|
)
|
|
|
|
|
|
"""
|
|
POST mj_qa_conflict/_search
|
|
{
|
|
"query": {
|
|
"range": {
|
|
"conflict_rank.subject_unity_bayes": {
|
|
"lte": -50
|
|
}
|
|
}
|
|
}
|
|
}
|
|
"""
|
|
# D:\init_mahdi\dataParsers\app\conflict_stuff\get_sample.py
|
|
# python -m app.conflict_stuff.get_sample
|