package org.algorithm.test;

import org.algorithm.core.cnn.entity.Lemma;
import org.algorithm.core.cnn.entity.Triad;
import org.algorithm.core.cnn.model.impl.RelationExtractionModelFromHttp;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: bijl
 * @Date: 2019/5/21 14:03
 * @Decription:
 */
public class RelationExtractionModelFromHttpTest {
    public static void main(String[] args) {

        String content = "脓涕咽部不适十余天，少量咳嗽，咳黄色痰，眼眶痛头痛2天，无咽痛、发热";
        List<Lemma> lemmas = new ArrayList<>();
        Lemma l1 = new Lemma();
        l1.setText("少量");
        l1.setPosition("10,11");

        Lemma l2 = new Lemma();
        l2.setText("咳嗽");
        l2.setPosition("12,13");

        Lemma l3 = new Lemma();
        l3.setText("咳");
        l3.setPosition("15,15");

        Lemma l4 = new Lemma();
        l4.setText("黄色痰");
        l4.setPosition("16,18");

        lemmas.add(l1);
        lemmas.add(l2);
        lemmas.add(l3);
        lemmas.add(l4);
//        RelationExtractionModelFromHttp re = new RelationExtractionModelFromHttp();
//        List<Triad> triads = re.execute(content, lemmas);
//        for (Triad triad:triads){
//            System.out.println(triad.getL_1().getText());
//            System.out.println(triad.getL_2().getText());
//            System.out.println(triad.getRelation());
//        }
//    # "entity_1_position": [12, 13],
//    # "entity_2_position": [10, 11],
//        positions_string = '12,13|10,11|15,15|16,18'
//        public List<Triad> execute(String content, List<Lemma > lemmas) {

    }
}
