-2

我想在Android應用程序中特別添加AI AgentPart of Speech tagging。我可以使用AlchemyApi嗎?或任何其他庫在Android中工作?我試過StanfordCoreNLP,但我無法在Android中使用它。此link不能用於下載Alchemy AndoidSDK Api。我讀了很多鏈接,甚至可以在Android中使用它嗎?請指導。用於Android中詞性標註和情感分析的庫?

回答

2
compile 'com.ibm.watson.developer_cloud:java-sdk:3.3.0' 

它添加到您的搖籃 看這裏爲examples

AlchemyLanguage service = new AlchemyLanguage(); 
    service.setApiKey("<api_key>"); 

    Map<String,Object> params; 
    params = new HashMap<String, Object>(); 
    params.put(AlchemyLanguage.TEXT, "IBM Watson won the Jeopardy television show hosted by Alex Trebek"); 
    CombinedResults combinedResults=service.getCombinedResults(params).execute(); 
    List<SAORelation> relationObject=combinedResults.getRelations(); 
    for (SAORelation relation: relationObject){ 
     System.out.println(relation.getSentence()); 
    } 

here對於什麼樣的鍊金術API能實現一些

+0

'API key'演示?它來自'AlchemyApi key'還是'IBM-Alchemy Api' ke? – Awais

+0

編譯你的代碼後,採取'API密鑰'。它提供了錯誤'I/CredentialUtils:JNDI字符串查找不可用。' – Awais

+0

這不是一個錯誤此方法私有靜態字符串getKeyUsingJNDI(字符串服務名)應始終返回null在Android上由於不支持的javax函數它只是一個警告 – ketrox