This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<Span> spanList = Arrays.asList(spans); | |
for (int i = 0; i < spanList.size(); i++) { | |
Span a = spanList.get(i); | |
for (int c = i + 1; c < spanList.size(); c++) { | |
Span b = spanList.get(c); | |
if (a.contains(b)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ner.extractor; | |
import java.util.Collection; | |
import opennlp.tools.util.Span; | |
import java.util.HashSet; | |
import parsercv.Extractor; | |
import parsercv.Setup; | |
import util.Search; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package model; | |
import java.util.Collection; | |
import java.util.regex.Pattern; | |
import opennlp.tools.util.Span; | |
import java.util.HashMap; | |
import java.util.LinkedList; | |
import java.util.Map; | |
import opennlp.namefind.RegexNameFinder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private TreeMap unserializeTreeMap(String fileName) { | |
TreeMap map = new TreeMap<>(); | |
if (Parser.class.getResourceAsStream("/resource/serialized/" + fileName) != null) { | |
try (InputStream in = Parser.class.getResourceAsStream("/resource/serialized/" + fileName); | |
ObjectInputStream ois = new ObjectInputStream(in)) { | |
map = (TreeMap) ois.readObject(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
} else { | |
// Matching | |
$associationConditions = $this->association($options['association'])->conditions(); | |
return $query | |
->join([ | |
'table' => 'tags_associations', | |
'alias' => $options['association'], | |
'type' => 'INNER', | |
'conditions' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Richiesta ajax per ricerca Tags | |
* | |
* Parametri: | |
* - scope: intero o array di interi che indica lo scope dei tags desiderati | |
* - query: digitazione dell'utente | |
* | |
* @return type | |
*/ | |
public function getDataAjax() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Callback Auth isAuthorized | |
* | |
* @param type $user | |
* @return boolean | |
*/ | |
public function isAuthorized($user = null) | |
{ | |
parent::isAuthorized($user); | |