[ml-completion] Update Kotlin model

GitOrigin-RevId: d416e39e79f8786958b92bd2d0430317b237c4c7
This commit is contained in:
Vitaliy.Bibaev
2019-12-02 16:08:51 +00:00
committed by intellij-monorepo-bot
parent 1ef74d75aa
commit abc2c19258
2 changed files with 5 additions and 5 deletions
@@ -12,13 +12,13 @@
<orderEntry type="library" scope="TEST" name="JUnit4" level="project" />
<orderEntry type="module-library">
<library name="completion-ranking-kotlin" type="repository">
<properties include-transitive-deps="false" maven-id="org.jetbrains.intellij.deps.completion:completion-ranking-kotlin:0.0.2" />
<properties include-transitive-deps="false" maven-id="org.jetbrains.intellij.deps.completion:completion-ranking-kotlin:0.0.4" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/completion/completion-ranking-kotlin/0.0.2/completion-ranking-kotlin-0.0.2.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/completion/completion-ranking-kotlin/0.0.4/completion-ranking-kotlin-0.0.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/completion/completion-ranking-kotlin/0.0.2/completion-ranking-kotlin-0.0.2-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/completion/completion-ranking-kotlin/0.0.4/completion-ranking-kotlin-0.0.4-sources.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -1,7 +1,7 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.completion.ranker
import com.completion.ranker.model.kotlin.MLWhiteBox
import com.completion.ranker.model.kotlin.MLCompletionModel
import com.intellij.ide.plugins.PluginManager
import com.intellij.internal.ml.DecisionFunction
import com.intellij.internal.ml.ModelMetadata
@@ -13,7 +13,7 @@ import com.intellij.openapi.extensions.PluginId
class FallbackKotlinMLRankingProvider : JarCompletionModelProvider("Kotlin", "kotlin_features"), WeakModelProvider {
override fun createModel(metadata: ModelMetadata): DecisionFunction {
return object : CompletionRankingModelBase(metadata) {
override fun predict(features: DoubleArray?): Double = MLWhiteBox.makePredict(features)
override fun predict(features: DoubleArray?): Double = MLCompletionModel.predict(features)
}
}