[ 
https://issues.apache.org/jira/browse/MAHOUT-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15866853#comment-15866853
 ] 

Dmitriy Lyubimov commented on MAHOUT-1940:
------------------------------------------

Normally, one who is writing in Java, does not have to really port anything 
from Scala. 
For example, Spark's Java APIs are in fact implemented in Scala. 

There are normally two ways of going about this: 
(1) write API in Java and implement them in Scala (the way Spark does), 
(2) write Java-compatible traits in Scala and then implement them in Scala as 
well. (which is what i do as it saves complexity a bit). 

to approach the (2), the APIs should only be using Java-compatible types. That 
is, no Scala libraries (such as collections) or incompatible language 
constructs (such as implicits, curried functions, generics context bounds etc. 
etc.) Implementing API interfaces in Java just verifies this a bit better and 
allows avoiding a mixed build (which may sometimes be a problem due to circular 
dependencies between Java and Scala code).


> Provide a Java API to  SimilarityAnalysis and any other needed APIs
> -------------------------------------------------------------------
>
>                 Key: MAHOUT-1940
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1940
>             Project: Mahout
>          Issue Type: New Feature
>          Components: Algorithms, cooccurrence
>            Reporter: James Mackey
>
> We want to port the functionality from 
> org.apache.mahout.math.cf.SimilarityAnalysis.scala to java for easy 
> integration with a java project we will be creating that derives a similarity 
> measure from the co-occurrence and cross-occurrence matrix. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to