Datasets:

ArXiv:
License:
File size: 1,297 Bytes
c574d3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*

 * To change this template, choose Tools | Templates

 * and open the template in the editor.

 */
package tool.util;

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

/**

 *

 * @author

 */
public class DocumentConcepts {
    
    private String filename;
    private String text;
    private List<Concept> concepts;
    
    public DocumentConcepts(String filename, String text) {
        this.filename = filename;
        this.text = text;
        concepts = new ArrayList<>();
    }
    
    public String getFilename() {
        return filename;
    }
    
    public String getText() {
        return text;
    }
        
    public List<Concept> getConcepts() {
        return concepts;
    }
    
    public void setConcept(String[] tokens, Abbreviation abbreviationObject) {
        String[] cuis = tokens[4].contains("+") ? tokens[4].split("\\+") : tokens[4].split("\\|");
        String MeSHorSNOMEDcuis = Terminology.getMeSHorSNOMEDCuis(cuis);
        List<String> OMIMcuis = Terminology.getOMIMCuis(cuis);
        Concept concept = new Concept(tokens[1], tokens[3], MeSHorSNOMEDcuis, OMIMcuis);
        concept.setNameExpansion(text, abbreviationObject);
        concept.setStemmedName();
        concepts.add(concept);
    }
    
}