Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 838 Bytes

README.md

File metadata and controls

34 lines (22 loc) · 838 Bytes

BOQA

Simple usage by:

	// Test usage
	BoqaService service = new BoqaService(ontologyFile, annotationFile);
	service.scoreItemsForTestQuery();

	BOQACore.setAssociationFileType(Type.PAF);
	BOQACore boqaCore = new BOQACore(ontologyFile, annotationFile);

	List<Integer> queryAsBoqaIndices = new ArrayList<Integer>();
	queryAsBoqaIndices.add(1);
	queryAsBoqaIndices.add(2);
	queryAsBoqaIndices.add(3);

	List<ItemResultEntry> resultList = boqaCore.score(queryAsBoqaIndices);

	for (int i = 0; i < 10; i++) {

		int boqaId = resultList.get(i).getItemId();

		String itemName = boqaCore.getItemName(boqaId);

		double score = resultList.get(i).getScore();

		System.out.println("boqaId :" + boqaId);
		System.out.println("itemName :" + itemName);
		System.out.println("score :" + score);
		System.out.println();

	}
}