@@ -0,0 +1,2175 @@
+/*%0A * To change this license header, choose License Headers in Project Properties.%0A * To change this template file, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage com.narvis.engine;%0A%0Aimport com.narvis.dataaccess.DataAccessFactory;%0Aimport com.narvis.dataaccess.interfaces.IDataModelProvider;%0Aimport com.narvis.dataaccess.models.lang.word.Dictionary;%0Aimport com.narvis.dataaccess.models.lang.word.Word;%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0Aimport java.util.Map.Entry;%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;%0A%0A/**%0A *%0A * @author Nakou%0A */%0Apublic class DetailsAnalyser %7B%0A    private final IDataModelProvider%3CDictionary%3E dictionary; %0A    Map%3CString, String%3E wordsAssociations = new HashMap%3C%3E();%0A    public DetailsAnalyser(ArrayList%3CString%3E words, String providerName) throws Exception%7B%0A        this.dictionary = (IDataModelProvider%3CDictionary%3E) DataAccessFactory.getMetaDataProvider().getDataProvider(%22Dictionary%22);%0A        boolean nextIsLocation = false;%0A        for(String s : words)%7B%0A            if(this.nextProbablyLocation(s))%7B%0A                nextIsLocation = true;%0A            %7D else %7B%0A                this.isALocation(s);%0A            %7D%0A            if(nextIsLocation)%7B%0A                wordsAssociations.put(s,%22location%22);%0A                nextIsLocation = false;%0A            %7D%0A            %0A        %7D%0A        for(Entry%3CString, String%3E entry : wordsAssociations.entrySet()) %7B%0A            System.out.println(entry.getKey() + %22 %22 + entry.getValue());%0A        %7D%0A        %0A    %7D%0A    %0A    public boolean isALocation(String value)%7B%0A        boolean isACity = false;%0A        Word word = this.dictionary.getModel().getWordByValue(value);%0A        if(word != null)%7B%0A            if(word.containInformationType(%22location%22))%7B%0A                wordsAssociations.put(value, %22location%22);%0A                isACity = true;    %0A            %7D%0A        %7D%0A        return isACity;%0A    %7D%0A    %0A    public boolean nextProbablyLocation(String word)%7B%0A        boolean isProbablyLocation = false;%0A        if(word.equals(%22in%22))%0A            isProbablyLocation = true;%0A        return isProbablyLocation;%0A        %0A    %7D%0A%7D%0A

add DetailsAnalyser