You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/Content-Moderator/java-sdk-quickstart.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,8 +71,8 @@ repositories{
71
71
}
72
72
73
73
dependencies{
74
-
compile(group ="com.microsoft.azure.cognitiveservices", name ="azure-cognitiveservices-contentmoderator", version ="1.0.2-beta")
75
-
compile(group ="com.google.code.gson", name ="gson", version ="2.8.5")
74
+
compile(group ="com.microsoft.azure.cognitiveservices", name ="azure-cognitiveservices-contentmoderator", version ="1.0.2-beta")
75
+
compile(group ="com.google.code.gson", name ="gson", version ="2.8.5")
76
76
}
77
77
```
78
78
@@ -84,7 +84,7 @@ mkdir -p src/main/java
84
84
85
85
Then create a file named *ContentModeratorQuickstart.java* in the new folder. Open the file in your preferred editor or IDE and import the following libraries at the top:
@@ -115,7 +115,7 @@ In the application's `main` method, create a [ContentModeratorClient](https://do
115
115
> [!NOTE]
116
116
> If you created the environment variable after you launched the application, you will need to close and reopen the editor, IDE, or shell running it to access the variable.
Then, in your *ContentModeratorQuickstart.java* file, add the following class definition inside the **ContentModeratorQuickstart** class. This inner class will be used later in the image moderation process.
Next, add the following code to the bottom of the `main` method. Or, you can add it to a separate method that's called from `main`. This code steps through each line of the _ImageFiles.txt_ file.
This line of code checks the image at the given URL for adult or racy content. See the Image moderation conceptual guide for information on these terms.
After the `while` loop, add the following code, which prints the results to the console and to an output file, *src/main/resources/ModerationOutput.json*.
*[What is Azure Content Moderator?](./overview.md)
203
-
* The source code for this sample can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/blob/master/ContentModerator/ContentModeratorQuickstart/src/main/java/ContentModeratorQuickstart.java).
203
+
* The source code for this sample can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/java/ContentModerator/src/main/java/ContentModeratorQuickstart.java).
0 commit comments