Skip to content

Commit

Permalink
chore: deprecate old Text analytics APIs to prepare for refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamilton723 committed Aug 23, 2022
1 parent 2052e13 commit 069be83
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ trait HasStringIndexType extends HasServiceParams {
def setStringIndexType(v: String): this.type = setScalarParam(stringIndexType, v)
}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.TextSentiment`", since = "v0.10.1")
object TextSentimentV2 extends ComplexParamsReadable[TextSentimentV2]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.TextSentiment`", since = "v0.10.1")
class TextSentimentV2(override val uid: String)
extends TextAnalyticsBase(uid) with BasicLogging with HasHandler {
logClass()
Expand All @@ -229,8 +231,10 @@ class TextSentimentV2(override val uid: String)

}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.LanguageDetector`", since = "v0.10.1")
object LanguageDetectorV2 extends ComplexParamsReadable[LanguageDetectorV2]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.LanguageDetector`", since = "v0.10.1")
class LanguageDetectorV2(override val uid: String)
extends TextAnalyticsBase(uid) with BasicLogging with HasHandler {
logClass()
Expand All @@ -242,8 +246,10 @@ class LanguageDetectorV2(override val uid: String)
def urlPath: String = "/text/analytics/v2.0/languages"
}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.EntityDetector`", since = "v0.10.1")
object EntityDetectorV2 extends ComplexParamsReadable[EntityDetectorV2]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.EntityDetector`", since = "v0.10.1")
class EntityDetectorV2(override val uid: String)
extends TextAnalyticsBase(uid) with BasicLogging with HasHandler {
logClass()
Expand All @@ -255,8 +261,10 @@ class EntityDetectorV2(override val uid: String)
def urlPath: String = "/text/analytics/v2.0/entities"
}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.NER`", since = "v0.10.1")
object NERV2 extends ComplexParamsReadable[NERV2]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.NER`", since = "v0.10.1")
class NERV2(override val uid: String) extends TextAnalyticsBase(uid) with BasicLogging with HasHandler {
logClass()

Expand All @@ -267,8 +275,10 @@ class NERV2(override val uid: String) extends TextAnalyticsBase(uid) with BasicL
def urlPath: String = "/text/analytics/v2.1/entities"
}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.KeyPhraseExtractor`", since = "v0.10.1")
object KeyPhraseExtractorV2 extends ComplexParamsReadable[KeyPhraseExtractorV2]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.KeyPhraseExtractor`", since = "v0.10.1")
class KeyPhraseExtractorV2(override val uid: String)
extends TextAnalyticsBase(uid) with BasicLogging with HasHandler {
logClass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,10 @@ private[ml] abstract class TextAnalyticsSDKBase[T]()
override def copy(extra: ParamMap): Transformer = defaultCopy(extra)
}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.LanguageDetector`", since = "v0.10.1")
object LanguageDetectorSDK extends ComplexParamsReadable[LanguageDetectorSDK]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.LanguageDetector`", since = "v0.10.1")
class LanguageDetectorSDK(override val uid: String)
extends TextAnalyticsSDKBase[DetectedLanguageSDK]() {
logClass()
Expand Down Expand Up @@ -223,8 +225,10 @@ class LanguageDetectorSDK(override val uid: String)
}
}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.KeyPhraseExtractor`", since = "v0.10.1")
object KeyPhraseExtractorSDK extends ComplexParamsReadable[KeyPhraseExtractorSDK]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.KeyPhraseExtractor`", since = "v0.10.1")
class KeyPhraseExtractorSDK(override val uid: String)
extends TextAnalyticsSDKBase[KeyphraseSDK]() {
logClass()
Expand Down Expand Up @@ -252,8 +256,10 @@ class KeyPhraseExtractorSDK(override val uid: String)
}
}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.TextSentiment`", since = "v0.10.1")
object TextSentimentSDK extends ComplexParamsReadable[TextSentiment]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.TextSentiment`", since = "v0.10.1")
class TextSentimentSDK(override val uid: String)
extends TextAnalyticsSDKBase[SentimentScoredDocumentSDK]() with HasOpinionMining {
logClass()
Expand Down Expand Up @@ -282,8 +288,10 @@ class TextSentimentSDK(override val uid: String)
}
}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.PII`", since = "v0.10.1")
object PIISDK extends ComplexParamsReadable[PII]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.PII`", since = "v0.10.1")
class PIISDK(override val uid: String) extends TextAnalyticsSDKBase[PIIEntityCollectionSDK]() {
logClass()

Expand All @@ -310,8 +318,10 @@ class PIISDK(override val uid: String) extends TextAnalyticsSDKBase[PIIEntityCol
}
}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.AnalyzeHealthText`", since = "v0.10.1")
object HealthcareSDK extends ComplexParamsReadable[HealthcareSDK]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.AnalyzeHealthText`", since = "v0.10.1")
class HealthcareSDK(override val uid: String) extends TextAnalyticsSDKBase[HealthEntitiesResultSDK]() {
logClass()

Expand Down Expand Up @@ -341,8 +351,10 @@ class HealthcareSDK(override val uid: String) extends TextAnalyticsSDKBase[Healt
}
}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.EntityDetector`", since = "v0.10.1")
object EntityDetectorSDK extends ComplexParamsReadable[EntityDetectorSDK]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.EntityDetector`", since = "v0.10.1")
class EntityDetectorSDK(override val uid: String) extends TextAnalyticsSDKBase[LinkedEntityCollectionSDK]() {
logClass()

Expand All @@ -369,8 +381,10 @@ class EntityDetectorSDK(override val uid: String) extends TextAnalyticsSDKBase[L
}
}

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.NER`", since = "v0.10.1")
object NERSDK extends ComplexParamsReadable[NERSDK]

@deprecated(message = "Please use `com.microsoft.azure.synapse.ml.cognitive.NER`", since = "v0.10.1")
class NERSDK(override val uid: String) extends TextAnalyticsSDKBase[NERCollectionSDK]() {
logClass()

Expand Down

0 comments on commit 069be83

Please sign in to comment.