Skip to content

drseb/boqa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1a9bf11 · Nov 21, 2018

History

49 Commits
Apr 26, 2016
Nov 21, 2018
Mar 23, 2016
May 10, 2016
Jul 3, 2018
Aug 2, 2018

Repository files navigation

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();

	}
}