├── .github
├── ISSUE_TEMPLATE.md
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── CONTRIBUTING.md
├── ContentModerator
├── ContentModeratorQuickstart
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── ContentModeratorQuickstart.java
│ │ └── resources
│ │ ├── ImageFiles.txt
│ │ ├── ModerationOutput.json
│ │ └── TextModeration.txt
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── microsoft
│ └── azure
│ └── contentmoderator
│ └── samples
│ ├── ImageJobs.java
│ ├── ImageList.java
│ ├── ImageModeration.java
│ ├── ImageReviews.java
│ ├── Samples.java
│ ├── TermList.java
│ ├── TextModeration.java
│ ├── VideoReviews.java
│ └── VideoTranscriptReviews.java
├── InkRecognition
├── .gitignore
├── README.md
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── azure
│ │ │ └── cognitiveservices
│ │ │ └── inkrecognitionsample
│ │ │ ├── InkPointImplementor.java
│ │ │ ├── InkStrokeImplementor.java
│ │ │ ├── MainActivity.java
│ │ │ └── NoteTaker.java
│ │ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── backup_descriptor.xml
├── azure-cognitiveservices-inkrecognizer
│ ├── azure-cognitiveservices-inkrecognizer.jar
│ └── build.gradle
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── LICENSE.md
├── Language
├── BingSpellCheck
│ ├── .gitignore
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── microsoft
│ │ └── azure
│ │ └── cognitiveservices
│ │ └── language
│ │ └── spellcheck
│ │ └── samples
│ │ └── BingSpellCheckSample.java
└── LanguageUnderstanding
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── pom.xml
│ └── src
│ └── main
│ └── java
│ └── com
│ └── microsoft
│ └── azure
│ └── cognitiveservices
│ └── language
│ └── luis
│ └── samples
│ └── LuisSample.java
├── README.md
├── Search
├── BingAutoSuggest
│ ├── .gitignore
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── microsoft
│ │ └── azure
│ │ └── cognitiveservices
│ │ └── search
│ │ └── autosuggest
│ │ └── samples
│ │ └── BingAutoSuggestSample.java
├── BingCustomSearch
│ ├── .gitignore
│ ├── .gradle
│ │ ├── 5.1.1
│ │ │ ├── executionHistory
│ │ │ │ ├── executionHistory.bin
│ │ │ │ └── executionHistory.lock
│ │ │ ├── fileChanges
│ │ │ │ └── last-build.bin
│ │ │ ├── fileContent
│ │ │ │ └── fileContent.lock
│ │ │ ├── fileHashes
│ │ │ │ ├── fileHashes.bin
│ │ │ │ └── fileHashes.lock
│ │ │ ├── gc.properties
│ │ │ └── javaCompile
│ │ │ │ ├── classAnalysis.bin
│ │ │ │ ├── javaCompile.lock
│ │ │ │ └── taskHistory.bin
│ │ ├── buildOutputCleanup
│ │ │ ├── buildOutputCleanup.lock
│ │ │ ├── cache.properties
│ │ │ └── outputFiles.bin
│ │ └── vcs-1
│ │ │ └── gc.properties
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── build.gradle.kts
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── settings.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── BingCustomSearchSample.java
├── BingEntitySearch
│ ├── .gitignore
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── microsoft
│ │ └── azure
│ │ └── cognitiveservices
│ │ └── search
│ │ └── entitysearch
│ │ └── samples
│ │ └── BingEntitySearchSample.java
├── BingImageSearch
│ ├── Quickstart
│ │ ├── .gitignore
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── microsoft
│ │ │ └── azure
│ │ │ └── cognitiveservices
│ │ │ └── search
│ │ │ └── imagesearch
│ │ │ └── samples
│ │ │ └── BingImageSearchSample.java
│ └── multiFeatured
│ │ ├── .gitignore
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── microsoft
│ │ └── azure
│ │ └── cognitiveservices
│ │ └── search
│ │ └── imagesearch
│ │ └── samples
│ │ └── BingImageSearchSample.java
├── BingNewsSearch
│ ├── .gitignore
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── microsoft
│ │ └── azure
│ │ └── cognitiveservices
│ │ └── search
│ │ └── newssearch
│ │ └── samples
│ │ └── BingNewsSearchSample.java
├── BingVideoSearch
│ ├── .gitignore
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── microsoft
│ │ └── azure
│ │ └── cognitiveservices
│ │ └── search
│ │ └── videosearch
│ │ └── samples
│ │ └── BingVideoSearchSample.java
├── BingVisualSearch
│ ├── .gitignore
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── build.gradle.kts
│ ├── gradle
│ │ ├── config
│ │ │ ├── settings
│ │ │ ├── user-aliases.cmd
│ │ │ └── user-profile.cmd
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── settings.gradle.kts
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── BingVisualSearchSample.java
│ │ └── resources
│ │ └── image.jpg
└── BingWebSearch
│ ├── .gitignore
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── pom.xml
│ └── src
│ └── main
│ └── java
│ └── com
│ └── microsoft
│ └── azure
│ └── cognitiveservices
│ └── search
│ └── websearch
│ └── samples
│ └── BingWebSearchSample.java
├── Vision
├── ComputerVision
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── ComputerVisionQuickstart.java
│ └── target
│ │ ├── classes
│ │ └── ComputerVisionQuickstart.class
│ │ └── maven-status
│ │ └── maven-compiler-plugin
│ │ └── compile
│ │ └── default-compile
│ │ └── createdFiles.lst
└── CustomVision
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── pom.xml
│ └── src
│ └── main
│ ├── java
│ └── com
│ │ └── microsoft
│ │ └── azure
│ │ └── cognitiveservices
│ │ └── vision
│ │ └── customvision
│ │ └── samples
│ │ └── CustomVisionSamples.java
│ └── resources
│ ├── Hemlock
│ ├── hemlock_1.jpg
│ ├── hemlock_10.jpg
│ ├── hemlock_2.jpg
│ ├── hemlock_3.jpg
│ ├── hemlock_4.jpg
│ ├── hemlock_5.jpg
│ ├── hemlock_6.jpg
│ ├── hemlock_7.jpg
│ ├── hemlock_8.jpg
│ └── hemlock_9.jpg
│ ├── Japanese Cherry
│ ├── japanese_cherry_1.jpg
│ ├── japanese_cherry_10.jpg
│ ├── japanese_cherry_2.jpg
│ ├── japanese_cherry_3.jpg
│ ├── japanese_cherry_4.jpg
│ ├── japanese_cherry_5.jpg
│ ├── japanese_cherry_6.jpg
│ ├── japanese_cherry_7.jpg
│ ├── japanese_cherry_8.jpg
│ └── japanese_cherry_9.jpg
│ ├── ObjectTest
│ └── test_image.jpg
│ ├── Test
│ └── test_image.jpg
│ ├── fork
│ ├── fork_1.jpg
│ ├── fork_10.jpg
│ ├── fork_11.jpg
│ ├── fork_12.jpg
│ ├── fork_13.jpg
│ ├── fork_14.jpg
│ ├── fork_15.jpg
│ ├── fork_16.jpg
│ ├── fork_17.jpg
│ ├── fork_18.jpg
│ ├── fork_19.jpg
│ ├── fork_2.jpg
│ ├── fork_20.jpg
│ ├── fork_3.jpg
│ ├── fork_4.jpg
│ ├── fork_5.jpg
│ ├── fork_6.jpg
│ ├── fork_7.jpg
│ ├── fork_8.jpg
│ └── fork_9.jpg
│ └── scissors
│ ├── scissors_1.jpg
│ ├── scissors_10.jpg
│ ├── scissors_11.jpg
│ ├── scissors_12.jpg
│ ├── scissors_13.jpg
│ ├── scissors_14.jpg
│ ├── scissors_15.jpg
│ ├── scissors_16.jpg
│ ├── scissors_17.jpg
│ ├── scissors_18.jpg
│ ├── scissors_19.jpg
│ ├── scissors_2.jpg
│ ├── scissors_20.jpg
│ ├── scissors_3.jpg
│ ├── scissors_4.jpg
│ ├── scissors_5.jpg
│ ├── scissors_6.jpg
│ ├── scissors_7.jpg
│ ├── scissors_8.jpg
│ └── scissors_9.jpg
└── documentation-samples
└── quickstarts
└── LUIS
├── pom.xml
└── quickstart.java
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
4 | > Please provide us with the following information:
5 | > ---------------------------------------------------------------
6 |
7 | ### This issue is for a: (mark with an `x`)
8 | ```
9 | - [ ] bug report -> please search issues before submitting
10 | - [ ] feature request
11 | - [ ] documentation issue or request
12 | - [ ] regression (a behavior that used to work and stopped in a new release)
13 | ```
14 |
15 | ### Minimal steps to reproduce
16 | >
17 |
18 | ### Any log messages given by the failure
19 | >
20 |
21 | ### Expected/desired behavior
22 | >
23 |
24 | ### OS and Version?
25 | > Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
26 |
27 | ### Versions
28 | >
29 |
30 | ### Mention any other details that might be useful
31 |
32 | > ---------------------------------------------------------------
33 | > Thanks! We'll be in touch soon.
34 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Purpose
2 |
3 | * ...
4 |
5 | ## Does this introduce a breaking change?
6 |
7 | ```
8 | [ ] Yes
9 | [ ] No
10 | ```
11 |
12 | ## Pull Request Type
13 | What kind of change does this Pull Request introduce?
14 |
15 |
16 | ```
17 | [ ] Bugfix
18 | [ ] Feature
19 | [ ] Code style update (formatting, local variables)
20 | [ ] Refactoring (no functional changes, no api changes)
21 | [ ] Documentation content changes
22 | [ ] Other... Please describe:
23 | ```
24 |
25 | ## How to Test
26 | * Get the code
27 |
28 | ```
29 | git clone [repo-address]
30 | cd [repo-name]
31 | git checkout [branch-name]
32 | npm install
33 | ```
34 |
35 | * Test the code
36 |
37 | ```
38 | ```
39 |
40 | ## What to Check
41 | Verify that the following are valid
42 | * ...
43 |
44 | ## Other Information
45 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Auth filed
4 | *.auth
5 | *.azureauth
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.ear
14 |
15 | # Azure Tooling #
16 | node_modules
17 | packages
18 |
19 | # Eclipse #
20 | *.pydevproject
21 | .project
22 | .metadata
23 | bin/**
24 | tmp/**
25 | tmp/**/*
26 | *.tmp
27 | *.bak
28 | *.swp
29 | *~.nib
30 | local.properties
31 | .classpath
32 | .settings/
33 | .loadpath
34 |
35 | # Other Tooling #
36 | .classpath
37 | .project
38 | target/
39 | .idea
40 | *.iml
41 |
42 | # Mac OS #
43 | .DS_Store
44 | .DS_Store?
45 |
46 | # Windows #
47 | Thumbs.db
48 |
49 | # reduced pom files should not be included
50 | dependency-reduced-pom.xml
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to cognitive-services-java-sdk-samples
2 |
3 | This project welcomes contributions and suggestions. Most contributions require you to agree to a
4 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
5 | the rights to use your contribution. For details, visit https://cla.microsoft.com.
6 |
7 | When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
8 | a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
9 | provided by the bot. You will only need to do this once across all repos using our CLA.
10 |
11 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
12 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
13 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
14 |
15 | - [Code of Conduct](#coc)
16 | - [Issues and Bugs](#issue)
17 | - [Feature Requests](#feature)
18 | - [Submission Guidelines](#submit)
19 |
20 | ## Code of Conduct
21 | Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
22 |
23 | ## Found an Issue?
24 | If you find a bug in the source code or a mistake in the documentation, you can help us by
25 | [submitting an issue](#submit-issue) to the GitHub Repository. Even better, you can
26 | [submit a Pull Request](#submit-pr) with a fix.
27 |
28 | ## Want a Feature?
29 | You can *request* a new feature by [submitting an issue](#submit-issue) to the GitHub
30 | Repository. If you would like to *implement* a new feature, please submit an issue with
31 | a proposal for your work first, to be sure that we can use it.
32 |
33 | * **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
34 |
35 | ## Submission Guidelines
36 |
37 | ### Submitting an Issue
38 | Before you submit an issue, search the archive, maybe your question was already answered.
39 |
40 | If your issue appears to be a bug, and hasn't been reported, open a new issue.
41 | Help us to maximize the effort we can spend fixing issues and adding new
42 | features, by not reporting duplicate issues. Providing the following information will increase the
43 | chances of your issue being dealt with quickly:
44 |
45 | * **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
46 | * **Version** - what version is affected (e.g. 0.1.2)
47 | * **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you
48 | * **Browsers and Operating System** - is this a problem with all browsers?
49 | * **Reproduce the Error** - provide a live example or a unambiguous set of steps
50 | * **Related Issues** - has a similar issue been reported before?
51 | * **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
52 | causing the problem (line of code or commit)
53 |
54 | You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/[organization-name]/[repository-name]/issues/new].
55 |
56 | ### Submitting a Pull Request (PR)
57 | Before you submit your Pull Request (PR) consider the following guidelines:
58 |
59 | * Search the repository (https://github.com/[organization-name]/[repository-name]/pulls) for an open or closed PR
60 | that relates to your submission. You don't want to duplicate effort.
61 |
62 | * Make your changes in a new git fork:
63 |
64 | * Commit your changes using a descriptive commit message
65 | * Push your fork to GitHub:
66 | * In GitHub, create a pull request
67 | * If we suggest changes then:
68 | * Make the required updates.
69 | * Rebase your fork and force push to your GitHub repository (this will update your Pull Request):
70 |
71 | ```shell
72 | git rebase master -i
73 | git push -f
74 | ```
75 |
76 | That's it! Thank you for your contribution!
77 |
--------------------------------------------------------------------------------
/ContentModerator/ContentModeratorQuickstart/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | topic:
3 | - sample
4 | languages:
5 | - Java
6 | products:
7 | - Azure
8 | - Cognitive Services
9 | - Content Moderator
10 | ---
11 |
12 | # Sample Code for Content Moderator
13 |
14 | This sample code shows you how to moderate images with Content Moderator.
15 |
16 | ## Contents
17 |
18 | | File/folder | Description |
19 | |-------------|-------------|
20 | | `src\main\java` | Java source code. |
21 | | `README.md` | This README file. |
22 | | `src\main\Resources\ImageFiles.txt` | URLs for the images to moderate. |
23 | | `src\main\Resources\ModerationOutput.json`| Program output. The sample also writes to standard output. |
24 |
25 | ## Prerequisites
26 |
27 | - Java development environment : (IDE or command line)
28 | - Maven : make sure Maven is installed: https://maven.apache.org/download.cgi
29 | - Download Content Moderator SDK from Maven (for IDE): https://mvnrepository.com/artifact/com.microsoft.azure.cognitiveservices/azure-cognitiveservices-contentmoderator
30 |
31 | ## Setup
32 |
33 | - [Clone this sample repository](https://github.com/Azure-Samples/cognitive-services-samples-pr.git).
34 |
35 | ## Modifying the Sample for your Configuration
36 |
37 | 1. Store your Content Moderator API key in the `CONTENT_MODERATOR_SUBSCRIPTION_KEY` environment variable.
38 | 2. Store your Content Moderator base endpoint in the `CONTENT_MODERATOR_ENDPOINT` environment variable. For example: `https://westus.api.cognitive.microsoft.com`. Be sure to use the correct region your subscription is in, in the URL.
39 |
40 | ## Building and Running the Sample
41 | ### From command line:
42 | 1. Navigate to the example's root directory.
43 | 2. Enter `mvn compile exec:java -Dexec.cleanupDaemonThreads=false`.
44 | Maven will automatically install all dependencies.
45 |
46 | ## Next steps
47 |
48 | You can learn more about image moderation with Content Moderator at the [official documentation site](https://docs.microsoft.com/en-us/azure/cognitive-services/content-moderator/).
49 |
--------------------------------------------------------------------------------
/ContentModerator/ContentModeratorQuickstart/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | azure-contentmoderator-sample
7 | 0.0.1-SNAPSHOT
8 | ContentModeratorQuickstart.java
9 |
10 | https://github.com/Azure/bing-search-java
11 |
12 | UTF-8
13 |
14 |
15 |
16 |
17 | org.codehaus.mojo
18 | exec-maven-plugin
19 | 1.4.0
20 |
21 | ContentModeratorQuickstart
22 |
23 |
24 |
25 | maven-compiler-plugin
26 | 3.0
27 |
28 | 1.7
29 | 1.7
30 |
31 |
32 |
33 | maven-assembly-plugin
34 |
35 |
36 | package
37 |
38 | attached
39 |
40 |
41 |
42 | jar-with-dependencies
43 |
44 |
45 |
46 | ContentModeratorQuickstart
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | com.microsoft.azure
58 | azure
59 | 1.3.0
60 |
61 |
62 | commons-net
63 | commons-net
64 | 3.3
65 |
66 |
67 | com.microsoft.azure.cognitiveservices
68 | azure-cognitiveservices-contentmoderator
69 | 1.0.2-beta
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/ContentModerator/ContentModeratorQuickstart/src/main/resources/ImageFiles.txt:
--------------------------------------------------------------------------------
1 | https://moderatorsampleimages.blob.core.windows.net/samples/sample2.jpg
2 | https://moderatorsampleimages.blob.core.windows.net/samples/sample5.png
3 |
--------------------------------------------------------------------------------
/ContentModerator/ContentModeratorQuickstart/src/main/resources/ModerationOutput.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/ContentModerator/ContentModeratorQuickstart/src/main/resources/ModerationOutput.json
--------------------------------------------------------------------------------
/ContentModerator/ContentModeratorQuickstart/src/main/resources/TextModeration.txt:
--------------------------------------------------------------------------------
1 | "Is this a grabage email abcdef@abcd.com, phone: 6657789887, IP: 255.255.255.255, 1 Microsoft Way, Redmond, WA 98052. Crap is the profanity here. Is this information PII? phone 3144444444"
2 |
--------------------------------------------------------------------------------
/ContentModerator/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | azure-contentmoderator-sample
7 | 0.0.1-SNAPSHOT
8 | Samples.java
9 |
10 | https://github.com/Azure/bing-search-java
11 |
12 |
13 |
14 | org.codehaus.mojo
15 | exec-maven-plugin
16 | 1.4.0
17 |
18 | com.microsoft.azure.contentmoderator.samples.Samples
19 |
20 |
21 |
22 | maven-compiler-plugin
23 | 3.0
24 |
25 | 1.7
26 | 1.7
27 |
28 |
29 |
30 | maven-assembly-plugin
31 |
32 |
33 | package
34 |
35 | attached
36 |
37 |
38 |
39 | jar-with-dependencies
40 |
41 |
42 |
43 | com.microsoft.azure.contentmoderator.samples.Samples
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | com.microsoft.azure
55 | azure
56 | 1.3.0
57 |
58 |
59 | commons-net
60 | commons-net
61 | 3.3
62 |
63 |
64 | com.microsoft.azure.cognitiveservices
65 | azure-cognitiveservices-contentmoderator
66 | 0.0.1-beta
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/ContentModerator/src/main/java/com/microsoft/azure/contentmoderator/samples/ImageJobs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for
4 | * license information.
5 | */
6 |
7 | package com.microsoft.azure.contentmoderator.samples;
8 |
9 | import com.microsoft.azure.cognitiveservices.contentmoderator.implementation.ContentInner;
10 | import com.microsoft.azure.cognitiveservices.contentmoderator.implementation.ContentModeratorClientImpl;
11 | import com.microsoft.azure.cognitiveservices.contentmoderator.implementation.JobIdInner;
12 | import com.microsoft.azure.cognitiveservices.contentmoderator.implementation.JobInner;
13 |
14 | import java.io.IOException;
15 |
16 | public class ImageJobs {
17 | /*
18 | * The moderation job will use this workflow that you defined earlier.
19 | * See the quickstart article to learn how to setup custom workflows.
20 | */
21 | private static final String WorkflowName = "OCR";
22 |
23 | /*
24 | * The URL of the image to create a review job for.
25 | */
26 | private static final String ImageUrl =
27 | "https://moderatorsampleimages.blob.core.windows.net/samples/sample2.jpg";
28 |
29 | /*
30 | * The number of seconds to delay after a review has finished before
31 | * getting the review results from the server.
32 | */
33 | private static final int latencyDelay = 45;
34 |
35 | /*
36 | * The callback endpoint for completed reviews.
37 | * Reviews show up for reviewers on your team.
38 | * As reviewers complete reviews, results are sent to the
39 | * callback endpoint using an HTTP POST request.
40 | */
41 | private static final String CallbackEndpoint = "https%3A%2F%2Frequestb.in%2Fvxke1mvx";
42 |
43 | public static void execute(ContentModeratorClientImpl client) throws IOException, InterruptedException {
44 | System.out.println("Create moderation job for an image.");
45 | ContentInner contentInner = new ContentInner();
46 | contentInner.withContentValue(ImageUrl);
47 |
48 | // The WorkflowName contains the nameof the workflow defined in the online review tool.
49 | // See the quickstart article to learn more.
50 | JobIdInner jobResult = client.reviews().createJob(
51 | Samples.TeamName,
52 | "image",
53 | "contentID",
54 | WorkflowName,
55 | "application/json",
56 | contentInner,
57 | CallbackEndpoint);
58 |
59 | String jobId = jobResult.jobId();
60 | // Record the job ID.
61 | System.out.println("Job id created: " + jobId);
62 |
63 | Thread.sleep(2000);
64 | System.out.println();
65 |
66 | System.out.println("Get job status before review.");
67 | JobInner job = client.reviews().getJobDetails(
68 | Samples.TeamName, jobId);
69 | System.out.println("Job status:" + job.status());
70 | System.out.println();
71 | System.out.println("Perform manual reviews on the Content Moderator site.");
72 | System.out.println("Then, press any key to continue.");
73 | System.in.read();
74 |
75 | System.out.println();
76 | System.out.println("Waiting " + latencyDelay + " seconds for results to propagate.");
77 | Thread.sleep(latencyDelay * 1000);
78 |
79 | System.out.println("Get job status after review.");
80 | job = client.reviews().getJobDetails(
81 | Samples.TeamName, jobId);
82 | System.out.println("Job status:" + job.status());
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/ContentModerator/src/main/java/com/microsoft/azure/contentmoderator/samples/ImageModeration.java:
--------------------------------------------------------------------------------
1 | package com.microsoft.azure.contentmoderator.samples;
2 |
3 | import com.microsoft.azure.cognitiveservices.contentmoderator.implementation.*;
4 |
5 | import java.io.*;
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | public class ImageModeration {
10 | /*
11 | * Contains the image moderation results for an image, including
12 | * text and face detection results.
13 | */
14 | public static class EvaluationData
15 | {
16 | /*
17 | * The URL of the evaluated image.
18 | */
19 | public String ImageUrl;
20 |
21 | /*
22 | * The image moderation results.
23 | */
24 | public EvaluateInner ImageModeration;
25 |
26 | /*
27 | * The text detection results.
28 | */
29 | public OCRInner TextDetection;
30 |
31 | /*
32 | * The face detection results;
33 | */
34 | public FoundFacesInner FaceDetection;
35 | }
36 |
37 | /*
38 | * The name of the file that contains the image URLs to evaluate.
39 | * You will need to create an input file and update this path
40 | * accordingly. Relative paths are ralative the execution directory.
41 | */
42 | private static String ImageUrlFile = "ImageFiles.txt";
43 |
44 | /*
45 | * The name of the file to contain the output from the evaluation.
46 | * Relative paths are ralative the execution directory.
47 | */
48 | private static String OutputFile = "ModerationOutput.json";
49 |
50 | public static void execute(ContentModeratorClientImpl client) throws IOException, InterruptedException {
51 | // Create an object in which to store the image moderation results.
52 | List evaluationData = new ArrayList();
53 |
54 | // Read image URLs from the input file and evaluate each one.
55 | try (BufferedReader inputStream =
56 | new BufferedReader(new FileReader(new File(ImageUrlFile)))) {
57 | String line;
58 | while ((line = inputStream.readLine()) != null)
59 | {
60 | if (line.length() > 0)
61 | {
62 | EvaluationData imageData = EvaluateImage(client, line);
63 | evaluationData.add(imageData);
64 | }
65 | }
66 | }
67 |
68 | // Save the moderation results to a file.
69 | try (BufferedWriter writer =
70 | new BufferedWriter(new FileWriter(new File(OutputFile))))
71 | {
72 | writer.write(evaluationData.toString());
73 | }
74 | }
75 |
76 | /*
77 | * Evaluates an image using the Image Moderation APIs.
78 | * This method throttles calls to the API.
79 | * Your Content Moderator service key will have a requests per second (RPS)
80 | * rate limit, and the SDK will throw an exception with a 429 error code
81 | * if you exceed that limit. A free tier key has a 1 RPS rate limit.
82 | * @param client The Content Moderator API wrapper to use.
83 | * @param imageUrl The URL of the image to evaluate.
84 | * @return Aggregated image moderation results for the image.
85 | */
86 | private static EvaluationData EvaluateImage(
87 | ContentModeratorClientImpl client, String imageUrl) throws InterruptedException {
88 | BodyModelInner url = new BodyModelInner();
89 | EvaluationData imageData = new EvaluationData();
90 | url.withDataRepresentation("URL");
91 | url.withValue(imageUrl);
92 | imageData.ImageUrl = url.value();
93 |
94 | // Evaluate for adult and racy content.
95 | imageData.ImageModeration =
96 | client.imageModerations().evaluateUrlInput(
97 | "application/json",
98 | url,
99 | true);
100 | Thread.sleep(1000);
101 |
102 | // Detect and extract text.
103 | imageData.TextDetection =
104 | client.imageModerations().oCRUrlInput(
105 | "eng",
106 | "application/json",
107 | url,
108 | true,
109 | false);
110 | Thread.sleep(1000);
111 |
112 | // Detect faces.
113 | imageData.FaceDetection =
114 | client.imageModerations().findFacesUrlInput(
115 | "application/json",
116 | url,
117 | true);
118 | Thread.sleep(1000);
119 |
120 | return imageData;
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ContentModerator/src/main/java/com/microsoft/azure/contentmoderator/samples/Samples.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for
4 | * license information.
5 | */
6 |
7 | package com.microsoft.azure.contentmoderator.samples;
8 |
9 | import com.microsoft.azure.cognitiveservices.contentmoderator.implementation.ContentModeratorClientImpl;
10 | import com.microsoft.rest.credentials.ServiceClientCredentials;
11 | import okhttp3.Interceptor;
12 | import okhttp3.OkHttpClient;
13 | import okhttp3.Request;
14 | import okhttp3.Response;
15 |
16 | import java.io.*;
17 | import java.net.URL;
18 | import java.util.ArrayList;
19 | import java.util.List;
20 |
21 | public class Samples {
22 | /**
23 | * The key for the bing api.
24 | */
25 | public static String apiKey = null;
26 |
27 | /*
28 | * The name of the team to assign the job to.
29 | * This must be the team name you used to create your
30 | * Content Moderator account. You can retrieve your team name from
31 | * the Conent Moderator web site. Your team name is the Id associated
32 | * with your subscription.
33 | */
34 | public static String TeamName;
35 |
36 | /**
37 | * Makes an instance of the ComputerVisionAPIImpl.
38 | * @param subscriptionKey cognitive services bing subscription key
39 | * @return EntitySearchAPIImpl instance
40 | */
41 | public static ContentModeratorClientImpl getClient(final String subscriptionKey) {
42 | return new ContentModeratorClientImpl(
43 | new ServiceClientCredentials() {
44 | @Override
45 | public void applyCredentialsFilter(OkHttpClient.Builder builder) {
46 | builder.addNetworkInterceptor(
47 | new Interceptor() {
48 | @Override
49 | public Response intercept(Interceptor.Chain chain) throws IOException {
50 | Request request = null;
51 | Request original = chain.request();
52 | // Request customization: add request headers
53 | Request.Builder requestBuilder = original.newBuilder()
54 | .addHeader("Ocp-Apim-Subscription-Key", subscriptionKey);
55 | request = requestBuilder.build();
56 | return chain.proceed(request);
57 | }
58 | });
59 | }
60 | }).withBaseUrl(System.getenv("CONTENT_MODERATOR_ENDPOINT")); // Add your endpoint to your environment variables.
61 | }
62 |
63 | static String readFileContents(String filePath) throws IOException {
64 | // Load the input text.
65 | StringBuffer buffer = new StringBuffer();
66 | try (BufferedReader inputStream =
67 | new BufferedReader(new FileReader(new File(filePath)))) {
68 | String line;
69 | while ((line = inputStream.readLine()) != null)
70 | {
71 | buffer.append(line);
72 | }
73 | }
74 |
75 | return buffer.toString();
76 | }
77 |
78 | /**
79 | * Main entry point.
80 | * @param args the parameters
81 | */
82 | public static void main(String[] args) {
83 | try {
84 | if(apiKey == null) {
85 | // Add your Azure Content Moderator subscription key to your environment variables.
86 | apiKey = System.getenv(System.getenv("CONTENT_MODERATOR_SUBSCRIPTION_KEY"));
87 | if(apiKey == null) {
88 | throw new Exception("Azure Content Moderator key not found.");
89 | }
90 | }
91 |
92 | if(TeamName == null) {
93 | // Add your Azure Content Moderator team name to your environment variables.
94 | TeamName = System.getenv("CONTENT_MODERATOR_TEAM_NAME");
95 | if(TeamName == null) {
96 | throw new Exception("Azure Content Moderator team name not found.");
97 | }
98 | }
99 |
100 | ContentModeratorClientImpl client = Samples.getClient(apiKey);
101 | ImageJobs.execute(client);
102 | ImageList.execute(client);
103 | //Please view sample and create required files before uncommenting.
104 | //ImageModeration.execute(client);
105 | ImageReviews.execute(client);
106 | TermList.execute(client);
107 | //Please view sample and create required files before uncommenting.
108 | //TextModeration.execute(client);
109 | VideoReviews.execute(client);
110 | VideoTranscriptReviews.execute(client);
111 |
112 | } catch (Exception e) {
113 | System.out.println(e.getMessage());
114 | e.printStackTrace();
115 | }
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/ContentModerator/src/main/java/com/microsoft/azure/contentmoderator/samples/TextModeration.java:
--------------------------------------------------------------------------------
1 | package com.microsoft.azure.contentmoderator.samples;
2 |
3 | import com.microsoft.azure.cognitiveservices.contentmoderator.implementation.ContentModeratorClientImpl;
4 | import com.microsoft.azure.cognitiveservices.contentmoderator.implementation.ScreenInner;
5 |
6 | import java.io.*;
7 |
8 | public class TextModeration {
9 | /*
10 | * The name of the file that contains the text to evaluate.
11 | * You will need to create an input file and update this path
12 | * accordingly. Relative paths are ralative the execution directory.
13 | */
14 | private static String TextFile = "TextFile.txt";
15 |
16 | static void execute(ContentModeratorClientImpl client) throws IOException {
17 |
18 | String text = Samples.readFileContents(TextFile);
19 |
20 | text = text.replaceAll(System.lineSeparator(), " ");
21 |
22 | // Screen the input text: check for profanity,
23 | // do autocorrect text, and check for personally identifying
24 | // information (PII)
25 | System.out.println("Normalize text and autocorrect typos.");
26 | ScreenInner result =
27 | client.textModerations().screenText("eng", "text/plain", text);
28 | System.out.println("Response:");
29 | System.out.println("Tracking Id: " + result.trackingId());
30 | System.out.println("Status: " + result.status().description());
31 | System.out.println("Auto corrected text: " + result.autoCorrectedText());
32 | if(result.classification() != null) {
33 | System.out.println("Classification: ");
34 | System.out.println(" Adult score: " + result.classification().adultScore());
35 | System.out.println(" Offensive score: " + result.classification().offensiveScore());
36 | System.out.println(" Racy score: " + result.classification().racyScore());
37 | System.out.println(" Review recommended: " + result.classification().reviewRecommended());
38 | }
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/InkRecognition/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | local.properties
4 | .idea
5 | .DS_Store
6 | build
7 | captures
8 | .externalNativeBuild
9 |
--------------------------------------------------------------------------------
/InkRecognition/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, inkrecognition
3 | platforms: java, android
4 | ---
5 |
6 | # Ink Recognition SDK Sample ##
7 |
8 | Sample app for the Ink Recognizer Cognitive Service SDK which provides easy access to a cloud-based REST API to analyze and recognize digital ink content.
9 | * Recognizes text and shapes drawn
10 | * Shows how to set language on the request
11 | * Shows how to set the ink content type on request
12 |
13 | ## Features
14 |
15 | This project framework provides examples for using the Ink Recognition SDK.
16 |
17 | ## Getting Started
18 |
19 | ### Prerequisites
20 |
21 | - Android 8.0 or later
22 | - You must have a Cognitive Services API account. Please refer the [Ink Recognizer API](https://docs.microsoft.com/en-us/azure/cognitive-services/ink-recognizer/overview) if you don't have one already.
23 |
24 | ### Quickstart
25 |
26 | To get these samples running locally, simply get the pre-requisites above, then:
27 |
28 | 1. Run 'git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git' in the terminal
29 | 2. Run 'cd cognitive-services-java-sdk-samples/InkRecognition' in the terminal
30 | 3. Set the key in the app/src/main/java/CognitiveServices/Ink/Recognition/NoteTaker.java
31 | 4. Run 'gradlew build' in the terminal at the root of InkRecognition to build the project
32 | 5. Run 'gradlew assemble' in the terminal at the root of InkRecognition for the release apk under InkRecognition/app/build/outputs/apk/release
33 | 6. Deploy the APK to the phone or emulator using Android Developer Tools
34 | 7. Write on your app screen
35 | 8. View the results appear on the screen after 2 seconds of inactivity
36 |
37 | ---
38 |
39 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
--------------------------------------------------------------------------------
/InkRecognition/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 28
5 | defaultConfig {
6 | applicationId "com.azure.cognitiveservices.inkrecognitionsample"
7 | minSdkVersion 26
8 | targetSdkVersion 28
9 | versionCode 1
10 | versionName "1.0"
11 | }
12 | compileOptions {
13 | sourceCompatibility 1.8
14 | targetCompatibility 1.8
15 | }
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | }
20 | }
21 | }
22 |
23 | dependencies {
24 | implementation fileTree(dir: 'libs', include: ['*.jar'])
25 | implementation 'com.android.support:appcompat-v7:28.0.0'
26 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
27 | implementation 'com.android.support:design:28.0.0'
28 | implementation project(':azure-cognitiveservices-inkrecognizer')
29 | }
30 |
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
15 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/java/com/azure/cognitiveservices/inkrecognitionsample/InkPointImplementor.java:
--------------------------------------------------------------------------------
1 | package com.azure.cognitiveservices.inkrecognitionsample;
2 |
3 | import com.microsoft.azure.cognitiveservices.inkrecognizer.InkPoint;
4 |
5 | //
6 | class InkPointImplementor implements InkPoint {
7 |
8 | final private float x;
9 | final private float y;
10 |
11 | //
12 | InkPointImplementor(float x, float y) {
13 | this.y = y;
14 | this.x = x;
15 | }
16 | //
17 |
18 | //
19 | public float getX() {
20 | return x;
21 | }
22 | //
23 |
24 | //
25 | public float getY() {
26 | return y;
27 | }
28 | //
29 |
30 | }
31 | //
32 |
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/java/com/azure/cognitiveservices/inkrecognitionsample/InkStrokeImplementor.java:
--------------------------------------------------------------------------------
1 | package com.azure.cognitiveservices.inkrecognitionsample;
2 |
3 | import android.util.DisplayMetrics;
4 | import com.microsoft.azure.cognitiveservices.inkrecognizer.InkPoint;
5 | import com.microsoft.azure.cognitiveservices.inkrecognizer.InkStroke;
6 | import com.microsoft.azure.cognitiveservices.inkrecognizer.InkStrokeKind;
7 |
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | //
12 | class InkStrokeImplementor implements InkStroke {
13 |
14 | final private long strokeId;
15 | final private List inkPoints = new ArrayList<>();
16 | final private String language;
17 | final private InkStrokeKind kind;
18 | private static int num = 0;
19 | private static final float INCH_TO_MM = 25.4f;
20 |
21 | //
22 | InkStrokeImplementor() {
23 | this.strokeId = getNextNum();
24 | this.language = "en-US";
25 | this.kind = InkStrokeKind.UNKNOWN;
26 | }
27 | //
28 |
29 | //
30 | public void addPoint(float x, float y, DisplayMetrics displayMetrics) {
31 | // Converts pixels to mm
32 | float xdpi = displayMetrics.xdpi;
33 | float ydpi = displayMetrics.ydpi;
34 | InkPointImplementor point = new InkPointImplementor(x / xdpi * INCH_TO_MM, y / ydpi * INCH_TO_MM);
35 | inkPoints.add(point);
36 | }
37 | //
38 |
39 | private int getNextNum() {
40 | return ++num;
41 | }
42 |
43 | //
44 | public Iterable getInkPoints() {
45 | return inkPoints;
46 | }
47 | //
48 |
49 | //
50 | public InkStrokeKind getKind() {
51 | return kind;
52 | }
53 | //
54 |
55 | //
56 | public long getId() {
57 | return strokeId;
58 | }
59 | //
60 |
61 | //
62 | public String getLanguage() {
63 | return language;
64 | }
65 | //
66 |
67 | }
68 | //
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/java/com/azure/cognitiveservices/inkrecognitionsample/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.azure.cognitiveservices.inkrecognitionsample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.util.Log;
6 |
7 | //
8 | public class MainActivity extends AppCompatActivity {
9 |
10 | private static final String TAG = "InkRecognizer";
11 |
12 | //
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | try {
17 | NoteTaker noteTaker = new NoteTaker(this);
18 | setContentView(noteTaker);
19 | } catch (Exception e) {
20 | Log.e(TAG, "Exception", e);
21 | }
22 | }
23 | //
24 |
25 | }
26 | //
27 |
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Recognizer
3 |
4 |
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/InkRecognition/app/src/main/res/xml/backup_descriptor.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/InkRecognition/azure-cognitiveservices-inkrecognizer/azure-cognitiveservices-inkrecognizer.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/azure-cognitiveservices-inkrecognizer/azure-cognitiveservices-inkrecognizer.jar
--------------------------------------------------------------------------------
/InkRecognition/azure-cognitiveservices-inkrecognizer/build.gradle:
--------------------------------------------------------------------------------
1 | configurations.maybeCreate("default")
2 | artifacts.add("default", file('azure-cognitiveservices-inkrecognizer.jar'))
--------------------------------------------------------------------------------
/InkRecognition/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.5.0'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 |
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/InkRecognition/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 |
15 |
16 |
--------------------------------------------------------------------------------
/InkRecognition/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/InkRecognition/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/InkRecognition/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Apr 29 13:55:11 PDT 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/InkRecognition/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/InkRecognition/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/InkRecognition/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':azure-cognitiveservices-inkrecognizer'
2 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
--------------------------------------------------------------------------------
/Language/BingSpellCheck/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Auth filed
4 | *.auth
5 | *.azureauth
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.ear
14 |
15 | # Azure Tooling #
16 | node_modules
17 | packages
18 |
19 | # Eclipse #
20 | *.pydevproject
21 | .project
22 | .metadata
23 | bin/**
24 | tmp/**
25 | tmp/**/*
26 | *.tmp
27 | *.bak
28 | *.swp
29 | *~.nib
30 | local.properties
31 | .classpath
32 | .settings/
33 | .loadpath
34 |
35 | # Other Tooling #
36 | .classpath
37 | .project
38 | target/
39 | .idea
40 | *.iml
41 |
42 | # Mac OS #
43 | .DS_Store
44 | .DS_Store?
45 |
46 | # Windows #
47 | Thumbs.db
48 |
49 | # reduced pom files should not be included
50 | dependency-reduced-pom.xml
51 |
--------------------------------------------------------------------------------
/Language/BingSpellCheck/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Language/BingSpellCheck/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Language/BingSpellCheck/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, bing-spell-check
3 | platforms: java
4 | author: milismsft
5 | ---
6 |
7 | # Bing Spell Check Sample
8 |
9 | This sample checks the spelling for the query "Bill Gatas" (with market and mode settings) and print outs the flagged tokens and spelling correction suggestions.
10 |
11 | ## Getting Started
12 |
13 | ### Prerequisites
14 | - If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
15 | - Get a Cognitive Services API key with which to authenticate the SDK's calls. [Sign up here](https://azure.microsoft.com/en-us/services/cognitive-services/spell-check/).
16 | - Set an environment variable named BING_SPELL_CHECK_SUBSCRIPTION_KEY with your Cognitive Services API key in the quickstart.
17 |
18 | ### Clone and run
19 |
20 | Execute the following from a command line:
21 |
22 | 1. `git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git`
23 | 1. `cd cognitive-services-java-sdk-samples/Language/BingSpellCheck`
24 | 1. `mvn compile exec:java cleanupDaemonThreads = false`
25 |
26 | ## More information
27 |
28 | - [Build and deploy Java apps on Azure](http://azure.com/java)
29 | - [The Java SDK reference](https://docs.microsoft.com/en-us/java/api/overview/azure/cognitiveservices/client?view=azure-java-stable)
30 | - [Bing Spell Check documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-spell-check/index)
31 |
32 | ---
33 |
34 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
35 |
--------------------------------------------------------------------------------
/Language/BingSpellCheck/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | bing-spell-check-java
7 | 1.0.1
8 | BingSpellCheckSample.java
9 | Sample for Bing Spell Check - Cognitive Services
10 | https://github.com/Azure-Samples/cognitive-services-java-sdk-samples
11 |
12 |
13 |
14 | org.codehaus.mojo
15 | exec-maven-plugin
16 | 1.4.0
17 |
18 | com.microsoft.azure.cognitiveservices.language.spellcheck.samples.BingSpellCheckSample
19 |
20 |
21 |
22 | maven-compiler-plugin
23 | 3.0
24 |
25 | 1.7
26 | 1.7
27 |
28 |
29 |
30 | maven-assembly-plugin
31 |
32 |
33 | package
34 |
35 | attached
36 |
37 |
38 |
39 | jar-with-dependencies
40 |
41 |
42 |
43 | com.microsoft.azure.cognitiveservices.language.spellcheck.samples.BingSpellCheckSample.java
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | com.microsoft.azure
55 | azure
56 | 1.9.0
57 |
58 |
59 | commons-net
60 | commons-net
61 | 3.3
62 |
63 |
64 | com.microsoft.azure.cognitiveservices
65 | azure-cognitiveservices-spellcheck
66 | 1.0.1
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/Language/BingSpellCheck/src/main/java/com/microsoft/azure/cognitiveservices/language/spellcheck/samples/BingSpellCheckSample.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for
4 | * license information.
5 | */
6 |
7 | package com.microsoft.azure.cognitiveservices.language.spellcheck.samples;
8 |
9 | import com.microsoft.azure.cognitiveservices.language.spellcheck.BingSpellCheckAPI;
10 | import com.microsoft.azure.cognitiveservices.language.spellcheck.BingSpellCheckManager;
11 | import com.microsoft.azure.cognitiveservices.language.spellcheck.models.SpellCheck;
12 | import com.microsoft.azure.cognitiveservices.language.spellcheck.models.SpellCheckerOptionalParameter;
13 | import com.microsoft.azure.cognitiveservices.language.spellcheck.models.SpellingFlaggedToken;
14 | import com.microsoft.azure.cognitiveservices.language.spellcheck.models.SpellingTokenSuggestion;
15 |
16 | import java.util.List;
17 |
18 | /**
19 | * Sample code for spell checking using Bing Spell Check, an Azure Cognitive Service.
20 | * - Spell check "Bill Gatas" with market and mode settings and print out the flagged tokens and suggestions.
21 | */
22 | public class BingSpellCheckSample {
23 | /**
24 | * Main function which runs the actual sample.
25 | *
26 | * @param client instance of the Bing Spell Check API client
27 | * @return true if sample runs successfully
28 | */
29 | public static boolean runSample(BingSpellCheckAPI client) {
30 | try {
31 |
32 | //=============================================================
33 | // This will use Bing Spell Check Cognitive Service to spell check "Bill Gatas" with market and mode
34 | // parameters then verify number of results and print out flagged tokens count, token and type of the
35 | // first item in the list of flagged tokens, the suggestions total count and the first suggestion in the
36 | // list and its score.
37 |
38 | SpellCheck result = client.bingSpellCheckOperations().spellChecker()
39 | .withText("Bill Gatas")
40 | .withMode("proof")
41 | .withMarket("en-us")
42 | .execute();
43 |
44 | // SpellCheck Results
45 | if (result.flaggedTokens().size() > 0)
46 | {
47 | // find the first spellcheck result
48 | SpellingFlaggedToken firstspellCheckResult = result.flaggedTokens().get(0);
49 |
50 | if (firstspellCheckResult != null)
51 | {
52 | System.out.println(String.format("SpellCheck Results#%d", result.flaggedTokens().size()));
53 | System.out.println(String.format("First SpellCheck Result token: %s ", firstspellCheckResult.token()));
54 | System.out.println(String.format("First SpellCheck Result Type: %s ", firstspellCheckResult.type()));
55 | System.out.println(String.format("First SpellCheck Result Suggestion Count: %d ",
56 | firstspellCheckResult.suggestions().size()));
57 |
58 | List suggestions = firstspellCheckResult.suggestions();
59 | if (suggestions.size() > 0)
60 | {
61 | SpellingTokenSuggestion firstSuggestion = suggestions.get(0);
62 | System.out.println(String.format("First SpellCheck Suggestion Score: %f ", firstSuggestion.score()));
63 | System.out.println(String.format("First SpellCheck Suggestion : %s ", firstSuggestion.suggestion()));
64 | }
65 | }
66 | else
67 | {
68 | System.out.println("Couldn't get any Spell check results!");
69 | }
70 | }
71 | else
72 | {
73 | System.out.println("Didn't see any SpellCheck results..");
74 | }
75 |
76 |
77 | return true;
78 | } catch (Exception f) {
79 | System.out.println(f.getMessage());
80 | f.printStackTrace();
81 | }
82 | return false;
83 | }
84 |
85 | /**
86 | * Main entry point.
87 | *
88 | * @param args the parameters
89 | */
90 | public static void main(String[] args) {
91 | try {
92 | //=============================================================
93 | // Authenticate
94 |
95 | final String subscriptionKey = System.getenv("AZURE_BING_SAMPLES_API_KEY");
96 |
97 | BingSpellCheckAPI client = BingSpellCheckManager.authenticate(subscriptionKey);
98 |
99 |
100 | runSample(client);
101 | } catch (Exception e) {
102 | System.out.println(e.getMessage());
103 | e.printStackTrace();
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/Language/LanguageUnderstanding/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Language/LanguageUnderstanding/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Language/LanguageUnderstanding/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, luis, language-understanding
3 | platforms: java
4 | author: milismsft
5 | ---
6 |
7 | # Language Understanding SDK Sample ##
8 |
9 | Sample code for Language Understanding, an Azure Cognitive Service, demonstrating how to consume the LUIS Authoring SDK to build an app or manage it and how to consume the LUIS Runtime SDK to predict user utterances.
10 | - Create an application with two entities.
11 | - Create a "Flight" composite entity including "Class" and "Destination"
12 | - Create a new "FindFlights" intent with two utterances and build two EntityLabel Object
13 | - Train and publish the application
14 | - Execute a LUIS prediction for a "find second class flight to new york" utterance and print the results
15 | - Execute a LUIS prediction for a "find flights to London in first class" utterance and print the results
16 |
17 |
18 | ## Features
19 |
20 | This project framework provides examples for the **Language Understanding SDK** for the [Language Understanding API](https://azure.microsoft.com/en-us/services/cognitive-services/)
21 |
22 | ## Getting Started
23 |
24 | ### Prerequisites
25 |
26 | - A Cognitive Services Language Understanding resource.
27 | - A Cognitive Services Language Understanding authoring key with which to authenticate the SDK's calls. [Sign up here](https://www.luis.ai/). After After creating your LUIS account, a starter key, also known as a programmatic key, is created automatically for LUIS account. To find the programmatic key, click on the account name in the upper-right navigation bar to open Account Settings, which displays the Authoring Key.
28 | - Maven
29 |
30 | ### Quickstart
31 |
32 | To get these samples running locally, simply get the pre-requisites above, then:
33 |
34 | 1. git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git
35 | 2. cd cognitive-services-java-sdk-samples/Language/LanguageUnderstanding
36 | 3. set env variable AZURE_LUIS_API_KEY to your cognitive services API key.
37 | 4. mvn compile exec:java
38 |
39 | ## More information ##
40 |
41 | * [http://azure.com/java](http://azure.com/java)
42 | * [Language Understanding Intelligent Service](https://azure.microsoft.com/en-us/services/cognitive-services/language-understanding-intelligent-service/)
43 | * [LUIS.ai](https://www.luis.ai)
44 | * [LUIS Docs](https://docs.microsoft.com/en-us/azure/cognitive-services/luis/home)
45 | * [LUIS Programmatic API v2 - Specification](https://github.com/Azure/azure-rest-api-specs/tree/current/specification/cognitiveservices/data-plane/LUIS/Programmatic)
46 | * [LUIS Programmatic API v2 - Documentation](https://westus.dev.cognitive.microsoft.com/docs/services/5890b47c39e2bb17b84a55ff/operations/5890b47c39e2bb052c5b9c2f)
47 |
48 | If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
49 |
50 | ---
51 |
52 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
53 |
--------------------------------------------------------------------------------
/Language/LanguageUnderstanding/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | luis-java
7 | 1.0.1
8 | LuisSample.java
9 | Sample for Language Understanding - Cognitive Services
10 | https://github.com/Azure-Samples/cognitive-services-java-sdk-samples
11 |
12 |
13 |
14 | org.codehaus.mojo
15 | exec-maven-plugin
16 | 1.4.0
17 |
18 | com.microsoft.azure.cognitiveservices.language.luis.samples.LuisSample
19 |
20 |
21 |
22 | maven-compiler-plugin
23 | 3.0
24 |
25 | 1.7
26 | 1.7
27 |
28 |
29 |
30 | maven-assembly-plugin
31 |
32 |
33 | package
34 |
35 | attached
36 |
37 |
38 |
39 | jar-with-dependencies
40 |
41 |
42 |
43 | com.microsoft.azure.cognitiveservices.language.luis.samples.LuisSample.java
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | com.microsoft.azure
55 | azure
56 | 1.9.0
57 |
58 |
59 | commons-net
60 | commons-net
61 | 3.3
62 |
63 |
64 | com.microsoft.azure.cognitiveservices
65 | azure-cognitiveservices-luis-authoring
66 | 1.0.2-beta
67 |
68 |
69 | com.microsoft.azure.cognitiveservices
70 | azure-cognitiveservices-luis-runtime
71 | 1.0.2-beta
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/Search/BingAutoSuggest/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Auth filed
4 | *.auth
5 | *.azureauth
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.ear
14 |
15 | # Azure Tooling #
16 | node_modules
17 | packages
18 |
19 | # Eclipse #
20 | *.pydevproject
21 | .project
22 | .metadata
23 | bin/**
24 | tmp/**
25 | tmp/**/*
26 | *.tmp
27 | *.bak
28 | *.swp
29 | *~.nib
30 | local.properties
31 | .classpath
32 | .settings/
33 | .loadpath
34 |
35 | # Other Tooling #
36 | .classpath
37 | .project
38 | target/
39 | .idea
40 | *.iml
41 |
42 | # Mac OS #
43 | .DS_Store
44 | .DS_Store?
45 |
46 | # Windows #
47 | Thumbs.db
48 |
49 | # reduced pom files should not be included
50 | dependency-reduced-pom.xml
51 |
--------------------------------------------------------------------------------
/Search/BingAutoSuggest/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Search/BingAutoSuggest/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Search/BingAutoSuggest/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, bing-auto-suggest
3 | platforms: java
4 | author: milismsft
5 | ---
6 |
7 | # Bing Auto Suggest SDK Sample ##
8 |
9 | Sample code for custom searching using Bing Auto Suggest, an Azure Cognitive Service.
10 | - Search for "Satya Nadella" and print out the first group of suggestions returned from the service.
11 |
12 |
13 | ## Features
14 |
15 | This project framework provides examples for the **Bing Auto Suggest SDK** for the [Auto Suggest API](https://azure.microsoft.com/en-us/services/cognitive-services/)
16 |
17 | ## Getting Started
18 |
19 | ### Prerequisites
20 |
21 | - A cognitive services API key with which to authenticate the SDK's calls. [Create a new Azure account, and try Cognitive Services for free.](https://azure.microsoft.com/free/cognitive-services/)
22 | - Maven
23 |
24 | ### Quickstart
25 |
26 | To get these samples running locally, simply get the pre-requisites above, then:
27 |
28 | 1. git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git
29 | 2. cd cognitive-services-java-sdk-samples/Search/BingAutoSuggest
30 | 3. set env variable BING_AUTOSUGGEST_SUBSCRIPTION_KEY to your cognitive services API key.
31 | 4. set env variable AZURE_BING_SAMPLES_CUSTOM_CONFIG_ID to your custom configuration id.
32 | 5. mvn compile exec:java
33 |
34 | ## More information ##
35 |
36 | [http://azure.com/java](http://azure.com/java)
37 |
38 | If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
39 |
40 | ---
41 |
42 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
43 |
--------------------------------------------------------------------------------
/Search/BingAutoSuggest/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | bing-auto-suggest-java
7 | 1.0.2
8 | BingAutoSuggestSample.java
9 | Sample for Bing Auto Suggest - Cognitive Services
10 | https://github.com/Azure-Samples/cognitive-services-java-sdk-samples
11 |
12 |
13 |
14 | org.codehaus.mojo
15 | exec-maven-plugin
16 | 1.4.0
17 |
18 | com.microsoft.azure.cognitiveservices.search.autosuggest.samples.BingAutoSuggestSample
19 |
20 |
21 |
22 | maven-compiler-plugin
23 | 3.0
24 |
25 | 1.7
26 | 1.7
27 |
28 |
29 |
30 | maven-assembly-plugin
31 |
32 |
33 | package
34 |
35 | attached
36 |
37 |
38 |
39 | jar-with-dependencies
40 |
41 |
42 |
43 | com.microsoft.azure.cognitiveservices.search.autosuggest.samples.BingAutoSuggestSample.java
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | com.microsoft.azure
55 | azure
56 | 1.9.0
57 |
58 |
59 | commons-net
60 | commons-net
61 | 3.3
62 |
63 |
64 | com.microsoft.azure.cognitiveservices
65 | azure-cognitiveservices-autosuggest
66 | 1.0.2-beta
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/Search/BingAutoSuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/samples/BingAutoSuggestSample.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for
4 | * license information.
5 | */
6 |
7 | package com.microsoft.azure.cognitiveservices.search.autosuggest.samples;
8 |
9 | import com.microsoft.azure.cognitiveservices.search.autosuggest.BingAutoSuggestSearchAPI;
10 | import com.microsoft.azure.cognitiveservices.search.autosuggest.BingAutoSuggestSearchManager;
11 | import com.microsoft.azure.cognitiveservices.search.autosuggest.models.SearchAction;
12 | import com.microsoft.azure.cognitiveservices.search.autosuggest.models.Suggestions;
13 | import com.microsoft.azure.cognitiveservices.search.autosuggest.models.SuggestionsSuggestionGroup;
14 |
15 | /**
16 | * Sample code for custom searching news using Bing Auto Suggest, an Azure Cognitive Service.
17 | * - Search for "Satya Nadella" and print out the first group of suggestions returned from the service.
18 | */
19 | public class BingAutoSuggestSample {
20 | /**
21 | * Main function which runs the actual sample.
22 | *
23 | * @param client instance of the Bing Auto Suggest API client
24 | * @return true if sample runs successfully
25 | */
26 | public static boolean runSample(BingAutoSuggestSearchAPI client, String customConfigId) {
27 | try {
28 |
29 | //=============================================================
30 | // This will request suggestions for "Satya Nadella" and print out the results
31 |
32 | System.out.println("Searched for \"Satya Nadella\" and print out the returned suggestions");
33 |
34 | Suggestions suggestions = client.bingAutoSuggestSearch().autoSuggest()
35 | .withQuery("Satya Nadella")
36 | .execute();
37 |
38 | if (suggestions != null && suggestions.suggestionGroups() != null && suggestions.suggestionGroups().size() > 0) {
39 | System.out.println("Found the following suggestions:");
40 | for (SearchAction suggestion: suggestions.suggestionGroups().get(0).searchSuggestions()) {
41 | System.out.println("....................................");
42 | System.out.println(suggestion.query());
43 | System.out.println(suggestion.displayText());
44 | System.out.println(suggestion.url());
45 | System.out.println(suggestion.searchKind());
46 | }
47 | } else {
48 | System.out.println("Didn't see any suggestion...");
49 | }
50 |
51 | return true;
52 | } catch (Exception f) {
53 | System.out.println(f.getMessage());
54 | f.printStackTrace();
55 | }
56 | return false;
57 | }
58 |
59 | /**
60 | * Main entry point.
61 | *
62 | * @param args the parameters
63 | */
64 | public static void main(String[] args) {
65 | try {
66 | //=============================================================
67 | // Authenticate
68 | // Add your Bing Autosuggest subscription key to your environment variables.
69 | final String subscriptionKey = System.getenv("BING_AUTOSUGGEST_SUBSCRIPTION_KEY");
70 | final String customConfigId = System.getenv("AZURE_BING_SAMPLES_CUSTOM_CONFIG_ID");
71 |
72 | BingAutoSuggestSearchAPI client = BingAutoSuggestSearchManager.authenticate(subscriptionKey);
73 |
74 |
75 | runSample(client, customConfigId);
76 | } catch (Exception e) {
77 | System.out.println(e.getMessage());
78 | e.printStackTrace();
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Auth filed
4 | *.auth
5 | *.azureauth
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.ear
14 |
15 | # Azure Tooling #
16 | node_modules
17 | packages
18 |
19 | # Eclipse #
20 | *.pydevproject
21 | .project
22 | .metadata
23 | bin/**
24 | tmp/**
25 | tmp/**/*
26 | *.tmp
27 | *.bak
28 | *.swp
29 | *~.nib
30 | local.properties
31 | .classpath
32 | .settings/
33 | .loadpath
34 |
35 | # Other Tooling #
36 | .classpath
37 | .project
38 | target/
39 | .idea
40 | *.iml
41 |
42 | # Mac OS #
43 | .DS_Store
44 | .DS_Store?
45 |
46 | # Windows #
47 | Thumbs.db
48 |
49 | # reduced pom files should not be included
50 | dependency-reduced-pom.xml
51 |
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/5.1.1/executionHistory/executionHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/5.1.1/executionHistory/executionHistory.bin
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/5.1.1/executionHistory/executionHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/5.1.1/executionHistory/executionHistory.lock
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/5.1.1/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/5.1.1/fileContent/fileContent.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/5.1.1/fileContent/fileContent.lock
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/5.1.1/fileHashes/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/5.1.1/fileHashes/fileHashes.bin
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/5.1.1/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/5.1.1/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/5.1.1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/5.1.1/gc.properties
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/5.1.1/javaCompile/classAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/5.1.1/javaCompile/classAnalysis.bin
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/5.1.1/javaCompile/javaCompile.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/5.1.1/javaCompile/javaCompile.lock
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/5.1.1/javaCompile/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/5.1.1/javaCompile/taskHistory.bin
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Tue Sep 17 11:50:22 PDT 2019
2 | gradle.version=5.1.1
3 |
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/buildOutputCleanup/outputFiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/buildOutputCleanup/outputFiles.bin
--------------------------------------------------------------------------------
/Search/BingCustomSearch/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingCustomSearch/.gradle/vcs-1/gc.properties
--------------------------------------------------------------------------------
/Search/BingCustomSearch/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Search/BingCustomSearch/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Search/BingCustomSearch/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, bing-custom-search
3 | platforms: java
4 | author: milismsft
5 | ---
6 |
7 | # Bing Custom Search SDK Sample ##
8 |
9 | Sample code for custom searching using Bing Custom Search, an Azure Cognitive Service.
10 | - Custom search for "Xbox" and print out name and url for the first web page in the results list.
11 |
12 |
13 | ## Features
14 |
15 | This project framework provides examples for the **Bing Custom Search SDK** for the [Custom Search API](https://azure.microsoft.com/en-us/services/cognitive-services/)
16 |
17 | ## Getting Started
18 |
19 | ### Prerequisites
20 |
21 | - A cognitive services API key with which to authenticate the SDK's calls. [Create a new Azure account, and try Cognitive Services for free.](https://azure.microsoft.com/free/cognitive-services/)
22 | - Maven
23 |
24 | ### Quickstart
25 |
26 | To get these samples running locally, simply get the pre-requisites above, then:
27 |
28 | 1. git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git
29 | 2. cd cognitive-services-java-sdk-samples/Search/BingCustomSearch
30 | 3. set a system environment variable named `BING_CUSTOM_SEARCH_SUBSCRIPTION_KEY` with your subscription key as a value, then reopen your command prompt or IDE. If not, you might get an API key not found exception.
31 | 4. Set env variable AZURE_BING_SAMPLES_CUSTOM_CONFIG_ID to your custom configuration id. Can set to 1 if you do not have a custom config id.
32 | 5. Use gradle to build and run the sample:
33 | 1. `gradle build`
34 | 2. `gradle run`
35 |
36 | ## More information ##
37 | [Bing Custom Search Documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-custom-search/)
38 |
39 | [Custom Search using the Bing Custom Search SDK and Java](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-custom-search/)
40 | [http://azure.com/java](http://azure.com/java)
41 |
42 | If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
43 |
44 | ---
45 |
46 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
47 |
--------------------------------------------------------------------------------
/Search/BingCustomSearch/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | java
3 | application
4 | }
5 | application {
6 | mainClassName = "main.java.BingCustomSearchSample"
7 | }
8 | repositories {
9 | mavenCentral()
10 | }
11 | dependencies {
12 | compile("org.slf4j:slf4j-simple:1.7.25")
13 | compile("com.microsoft.azure.cognitiveservices:azure-cognitiveservices-customsearch:1.0.2")
14 | }
--------------------------------------------------------------------------------
/Search/BingCustomSearch/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/Search/BingCustomSearch/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS="-Xmx64m"
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/Search/BingCustomSearch/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * The settings file is used to specify which projects to include in your build.
5 | *
6 | * Detailed information about configuring a multi-project build in Gradle can be found
7 | * in the user guide at https://docs.gradle.org/5.1.1/userguide/multi_project_builds.html
8 | */
9 |
10 | rootProject.name = "bing-custom-search-quickstart"
11 |
--------------------------------------------------------------------------------
/Search/BingCustomSearch/src/main/java/BingCustomSearchSample.java:
--------------------------------------------------------------------------------
1 | //
2 | package main.java;
3 |
4 | import com.microsoft.azure.cognitiveservices.search.customsearch.BingCustomSearchAPI;
5 | import com.microsoft.azure.cognitiveservices.search.customsearch.BingCustomSearchManager;
6 | import com.microsoft.azure.cognitiveservices.search.customsearch.models.SearchResponse;
7 | import com.microsoft.azure.cognitiveservices.search.customsearch.models.WebPage;
8 | //
9 |
10 | public class BingCustomSearchSample {
11 |
12 | //
13 | public static boolean runSample(BingCustomSearchAPI client, String customConfigId) {
14 | try {
15 |
16 | // This will search for "Xbox" using Bing Custom Search
17 | //and print out name and url for the first web page in the results list
18 |
19 | System.out.println("Searching for Query: \"Xbox\"");
20 | SearchResponse webData = client.bingCustomInstances().search()
21 | .withCustomConfig(customConfigId != null ? Long.valueOf(customConfigId) : 0)
22 | .withQuery("Xbox")
23 | .withMarket("en-us")
24 | .execute();
25 |
26 | if (webData != null && webData.webPages() != null && webData.webPages().value().size() > 0)
27 | {
28 | // find the first web page
29 | WebPage firstWebPagesResult = webData.webPages().value().get(0);
30 |
31 | if (firstWebPagesResult != null) {
32 | System.out.println(String.format("Webpage Results#%d", webData.webPages().value().size()));
33 | System.out.println(String.format("First web page name: %s ", firstWebPagesResult.name()));
34 | System.out.println(String.format("First web page URL: %s ", firstWebPagesResult.url()));
35 | } else {
36 | System.out.println("Couldn't find web results!");
37 | }
38 | } else {
39 | System.out.println("Didn't see any Web data..");
40 | }
41 |
42 | return true;
43 | } catch (Exception f) {
44 | System.out.println(f.getMessage());
45 | f.printStackTrace();
46 | }
47 | return false;
48 | }
49 | //
50 |
51 | //
52 | public static void main(String[] args) {
53 | try {
54 |
55 | // Set the BING_CUSTOM_SEARCH_SUBSCRIPTION_KEY and AZURE_BING_SAMPLES_CUSTOM_CONFIG_ID environment variables,
56 | // then reopen your command prompt or IDE. If not, you may get an API key not found exception.
57 | final String subscriptionKey = System.getenv("BING_CUSTOM_SEARCH_SUBSCRIPTION_KEY");
58 | // If you do not have a customConfigId, you can also use 1 as your value when setting your environment variable.
59 | final String customConfigId = System.getenv("AZURE_BING_SAMPLES_CUSTOM_CONFIG_ID");
60 |
61 | BingCustomSearchAPI client = BingCustomSearchManager.authenticate(subscriptionKey);
62 |
63 | runSample(client, customConfigId);
64 | } catch (Exception e) {
65 | System.out.println(e.getMessage());
66 | e.printStackTrace();
67 | }
68 | }
69 | //
70 | }
--------------------------------------------------------------------------------
/Search/BingEntitySearch/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Auth filed
4 | *.auth
5 | *.azureauth
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.ear
14 |
15 | # Azure Tooling #
16 | node_modules
17 | packages
18 |
19 | # Eclipse #
20 | *.pydevproject
21 | .project
22 | .metadata
23 | bin/**
24 | tmp/**
25 | tmp/**/*
26 | *.tmp
27 | *.bak
28 | *.swp
29 | *~.nib
30 | local.properties
31 | .classpath
32 | .settings/
33 | .loadpath
34 |
35 | # Other Tooling #
36 | .classpath
37 | .project
38 | target/
39 | .idea
40 | *.iml
41 |
42 | # Mac OS #
43 | .DS_Store
44 | .DS_Store?
45 |
46 | # Windows #
47 | Thumbs.db
48 |
49 | # reduced pom files should not be included
50 | dependency-reduced-pom.xml
51 |
--------------------------------------------------------------------------------
/Search/BingEntitySearch/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Search/BingEntitySearch/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Search/BingEntitySearch/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, bing-entity-search
3 | platforms: java
4 | author: milismsft
5 | ---
6 |
7 | # Bing Entity Search SDK Sample ##
8 |
9 | Sample [code](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/tree/master/Search/BingEntitySearch) for searching entities using Bing Entity Search, an Azure Cognitive Service.
10 | - Search the entities for "Satya Nadella" and print out a short description.
11 | - Search the entities and handle disambiguation results for an ambiguous query "William Gates".
12 | - Search the entities for a single store "Microsoft Store" and print out its phone number.
13 | - Search the entities for a list of restaurants "seattle restaurants" and present their names and phone numbers.
14 | - Trigger a bad request and shows how to read the error response.
15 |
16 |
17 | ## Features
18 |
19 | This project framework provides examples for the **Bing Entity Search SDK** for the [Entity Search API](https://azure.microsoft.com/en-us/services/cognitive-services/)
20 |
21 | ## Getting Started
22 |
23 | ### Prerequisites
24 |
25 | - A cognitive services API key with which to authenticate the SDK's calls. [Create a new Azure account, and try Cognitive Services for free.](https://azure.microsoft.com/free/cognitive-services/)
26 | - Maven
27 |
28 | ### Quickstart
29 |
30 | To get these samples running locally, simply get the pre-requisites above, then:
31 |
32 | 1. git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git
33 | 2. cd cognitive-services-java-sdk-samples/Search/BingEntitySearch
34 | 3. Set a system environment variable named `BING_ENTITY_SEARCH_SUBSCRIPTION_KEY` and add your subscription key value. Reopen your command prompt or IDE. If not, you might get an API key not found exception.
35 | 4. mvn compile exec:java
36 |
37 | ## More information ##
38 | [Bing Entity Search Documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-entities-search/)
39 |
40 | [Bing Entity Search Documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-entities-search/)
41 | [http://azure.com/java](http://azure.com/java)
42 |
43 | If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
44 |
45 | ---
46 |
47 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
48 |
--------------------------------------------------------------------------------
/Search/BingEntitySearch/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | bing-entity-search-java
7 | 1.0.1
8 | BingEntitySearchSample.java
9 | Sample for Bing Entity Search - Cognitive Services
10 | https://github.com/Azure-Samples/cognitive-services-java-sdk-samples
11 |
12 |
13 |
14 | org.codehaus.mojo
15 | exec-maven-plugin
16 | 1.4.0
17 |
18 | com.microsoft.azure.cognitiveservices.search.entitysearch.samples.BingEntitySearchSample
19 | false
20 |
21 |
22 |
23 | maven-compiler-plugin
24 | 3.0
25 |
26 | 1.7
27 | 1.7
28 |
29 |
30 |
31 | maven-assembly-plugin
32 |
33 |
34 | package
35 |
36 | attached
37 |
38 |
39 |
40 | jar-with-dependencies
41 |
42 |
43 |
44 | com.microsoft.azure.cognitiveservices.search.entitysearch.samples.BingEntitySearchSample.java
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | UTF-8
55 |
56 |
57 |
58 | com.microsoft.azure
59 | azure
60 | 1.9.0
61 |
62 |
63 | commons-net
64 | commons-net
65 | 3.3
66 |
67 |
68 | com.microsoft.azure.cognitiveservices
69 | azure-cognitiveservices-entitysearch
70 | 1.0.1
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/Search/BingImageSearch/Quickstart/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Auth filed
4 | *.auth
5 | *.azureauth
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.ear
14 |
15 | # Azure Tooling #
16 | node_modules
17 | packages
18 |
19 | # Eclipse #
20 | *.pydevproject
21 | .project
22 | .metadata
23 | bin/**
24 | tmp/**
25 | tmp/**/*
26 | *.tmp
27 | *.bak
28 | *.swp
29 | *~.nib
30 | local.properties
31 | .classpath
32 | .settings/
33 | .loadpath
34 |
35 | # Other Tooling #
36 | .classpath
37 | .project
38 | target/
39 | .idea
40 | *.iml
41 | .factorypath
42 | .vscode/
43 |
44 | # Mac OS #
45 | .DS_Store
46 | .DS_Store?
47 |
48 | # Windows #
49 | Thumbs.db
50 |
51 | # reduced pom files should not be included
52 | dependency-reduced-pom.xml
53 |
--------------------------------------------------------------------------------
/Search/BingImageSearch/Quickstart/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Search/BingImageSearch/Quickstart/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Search/BingImageSearch/Quickstart/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, bing-image-search
3 | platforms: java
4 | author: aahill
5 | ---
6 |
7 | # Java sample for the Bing Image Search SDK Quickstart ##
8 |
9 | This [code](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/blob/master/Search/BingImageSearch/Quickstart/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/samples/BingImageSearchSample.java) sample compliments the [Bing Image Search Quickstart](https://docs.microsoft.com/azure/cognitive-services/bing-image-search/image-sdk-java-quickstart) available on docs.microsoft.com.
10 |
11 | This Java application sends an image search query to the Bing Image Search API, parses the JSON response, and displays the URL of the first image returned, along with some other information.
12 |
13 | The [Bing Image Search API](https://azure.microsoft.com/services/cognitive-services/bing-image-search-api/) is an Azure Cognitive service, available from Microsoft.
14 |
15 | ## Getting Started
16 |
17 | ### Prerequisites
18 |
19 | - A cognitive services API key with which to authenticate the SDK's calls. [Create a new Azure account, and try Cognitive Services for free.](https://azure.microsoft.com/free/cognitive-services/)
20 | - The latest version of the [Java Development Kit](http://www.oracle.com/technetwork/java/javase/downloads/index.html) (JDK)
21 | - Maven
22 |
23 | You must have a [Cognitive Services API account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) with access to the Bing Search APIs. If you don't have an Azure subscription, you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free. Before continuing, You will need the access key provided after activating your free trial, or a paid subscription key from your Azure dashboard.
24 |
25 | ### Quickstart
26 |
27 | After getting the prerequisites above:
28 | 1. View the quickstart available [here]([Quickstart: Search for images using the Bing Image Search SDK and Java](https://docs.microsoft.com/azure/cognitive-services/bing-image-search/image-sdk-java-quickstart))
29 | 1. git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git
30 | 2. cd cognitive-services-java-sdk-samples/Search/BingImageSearch/Quickstart
31 | 3. Set a system environment variable named `BING_SEARCH_V7_SUBSCRIPTION_KEY` with your subscription key value,
32 | then reopen your command prompt or IDE. If not, you might get an API key not found exception.
33 | 4. mvn compile exec:java
34 |
35 | ## More information
36 |
37 | * [Quickstart: Search for images using the Bing Image Search SDK and Java](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-image-search/image-sdk-java-quickstart)
38 | * [Java on Azure](http://azure.com/java)
39 | * [The Bing Image Search API](https://azure.microsoft.com/en-us/services/cognitive-services/)
40 |
41 | If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
42 |
43 | ---
44 |
45 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
46 |
--------------------------------------------------------------------------------
/Search/BingImageSearch/Quickstart/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | bing-image-search-java
7 | 1.0.1
8 | BingImageSearchSample.java
9 | Sample for Bing Image Search - Cognitive Services
10 | https://github.com/Azure-Samples/cognitive-services-java-sdk-samples
11 |
12 |
13 |
14 | org.codehaus.mojo
15 | exec-maven-plugin
16 | 1.4.0
17 |
18 | com.microsoft.azure.cognitiveservices.search.imagesearch.samples.BingImageSearchSample
19 | false
20 |
21 |
22 |
23 | maven-compiler-plugin
24 | 3.0
25 |
26 | 1.7
27 | 1.7
28 |
29 |
30 |
31 | maven-assembly-plugin
32 |
33 |
34 | package
35 |
36 | attached
37 |
38 |
39 |
40 | jar-with-dependencies
41 |
42 |
43 |
44 | com.microsoft.azure.cognitiveservices.search.imagesearch.samples.BingImageSearchSample.java
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | UTF-8
55 |
56 |
57 |
58 | com.microsoft.azure
59 | azure
60 | 1.9.0
61 |
62 |
63 | commons-net
64 | commons-net
65 | 3.3
66 |
67 |
68 | com.microsoft.azure.cognitiveservices
69 | azure-cognitiveservices-imagesearch
70 | 1.0.1
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/Search/BingImageSearch/Quickstart/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/samples/BingImageSearchSample.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for
4 | * license information.
5 | */
6 |
7 | package com.microsoft.azure.cognitiveservices.search.imagesearch.samples;
8 |
9 | import com.microsoft.azure.cognitiveservices.search.imagesearch.BingImageSearchAPI;
10 | import com.microsoft.azure.cognitiveservices.search.imagesearch.BingImageSearchManager;
11 | import com.microsoft.azure.cognitiveservices.search.imagesearch.models.ImageObject;
12 | import com.microsoft.azure.cognitiveservices.search.imagesearch.models.ImagesModel;
13 |
14 | /**
15 | * Sample code for searching images using Bing Image Search, an Azure Cognitive Service.
16 | * - Searches images for "canadian rockies" then outputs the result.
17 | */
18 | public class BingImageSearchSample {
19 | /**
20 | * Main function which runs the actual sample.
21 | *
22 | * @param client instance of the Bing News Search API client
23 | * @param searchTerm a term to use in the image search request
24 | * @return true if sample runs successfully
25 | */
26 | public static void runSample(BingImageSearchAPI client, String searchTerm) {
27 | try {
28 |
29 | //=============================================================
30 | // This will search images for "canadian rockies" then print the first image result,
31 |
32 | System.out.println(String.format("Search images for query %s", searchTerm));
33 |
34 | ImagesModel imageResults = client.bingImages().search()
35 | .withQuery(searchTerm)
36 | .withMarket("en-us")
37 | .execute();
38 |
39 | if (imageResults != null && imageResults.value().size() > 0) {
40 | // Image results
41 | ImageObject firstImageResult = imageResults.value().get(0);
42 |
43 | System.out.println(String.format("Image result count: %d", imageResults.value().size()));
44 | System.out.println(String.format("First image insights token: %s", firstImageResult.imageInsightsToken()));
45 | System.out.println(String.format("First image thumbnail url: %s", firstImageResult.thumbnailUrl()));
46 | System.out.println(String.format("First image content url: %s", firstImageResult.contentUrl()));
47 | }
48 | else {
49 | System.out.println("Couldn't find any image results!");
50 | }
51 | }
52 | catch (Exception f) {
53 | System.out.println(f.getMessage());
54 | f.printStackTrace();
55 | }
56 | }
57 |
58 | /**
59 | * Main entry point.
60 | *
61 | * @param args the parameters
62 | */
63 | public static void main(String[] args) {
64 | try {
65 | // Authenticate
66 | // Set the BING_SEARCH_V7_SUBSCRIPTION_KEY environment variable,
67 | // then reopen your command prompt or IDE for changes to take effect.
68 | final String subscriptionKey = System.getenv("BING_SEARCH_V7_SUBSCRIPTION_KEY");
69 |
70 | BingImageSearchAPI client = BingImageSearchManager.authenticate(subscriptionKey);
71 | String searchTerm = "canadian rockies";
72 | runSample(client, searchTerm);
73 | } catch (Exception e) {
74 | System.out.println(e.getMessage());
75 | e.printStackTrace();
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/Search/BingImageSearch/multiFeatured/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Auth filed
4 | *.auth
5 | *.azureauth
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.ear
14 |
15 | # Azure Tooling #
16 | node_modules
17 | packages
18 |
19 | # Eclipse #
20 | *.pydevproject
21 | .project
22 | .metadata
23 | bin/**
24 | tmp/**
25 | tmp/**/*
26 | *.tmp
27 | *.bak
28 | *.swp
29 | *~.nib
30 | local.properties
31 | .classpath
32 | .settings/
33 | .loadpath
34 |
35 | # Other Tooling #
36 | .classpath
37 | .project
38 | target/
39 | .idea
40 | *.iml
41 | .factorypath
42 | .vscode/
43 |
44 | # Mac OS #
45 | .DS_Store
46 | .DS_Store?
47 |
48 | # Windows #
49 | Thumbs.db
50 |
51 | # reduced pom files should not be included
52 | dependency-reduced-pom.xml
53 |
--------------------------------------------------------------------------------
/Search/BingImageSearch/multiFeatured/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Search/BingImageSearch/multiFeatured/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Search/BingImageSearch/multiFeatured/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, bing-image-search
3 | platforms: java
4 | author: milismsft
5 | ---
6 |
7 | # Bing Image Search SDK Sample ##
8 |
9 | Sample [code](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/blob/master/Search/BingImageSearch/multiFeatured/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/samples/BingImageSearchSample.java) for searching images using Bing Image Search, an Azure Cognitive Service.
10 | - Search images for "canadian rockies" then verify number of results and print out pivot suggestion and query expansion.
11 | - Search images for "studio ghibli", filtered for animated GIFs and wide aspect and print out insightsToken, thumbnail url and web url.
12 | - Search for trending images then print out categories and tiles.
13 | - Search images for "degas" and then search the image details of the first item in result list.
14 |
15 |
16 | ## Features
17 |
18 | This project framework provides examples for the **Bing Image Search SDK** for the [Image Search API](https://azure.microsoft.com/en-us/services/cognitive-services/)
19 |
20 | ## Getting Started
21 |
22 | ### Prerequisites
23 |
24 | - A cognitive services API key with which to authenticate the SDK's calls. [Create a new Azure account, and try Cognitive Services for free.](https://azure.microsoft.com/free/cognitive-services/)
25 | - Maven
26 |
27 | ### Quickstart
28 |
29 | To get these samples running locally, simply get the pre-requisites above, then:
30 |
31 | 1. git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git
32 | 2. cd cognitive-services-java-sdk-samples/Search/BingImageSearch
33 | 3. Either set a system environment variable named `AZURE_BING_SAMPLES_API_KEY` to your cognitive Services API key, or copy your key into the program. If you are going to set the AZURE_BING_SAMPLES_API_KEY environment variable, make sure to set it based on your OS, then reopen your command prompt or IDE. If not, you might get an API key not found exception.
34 | 4. mvn compile exec:java
35 |
36 | ## More information ##
37 |
38 | [Search for images using the Bing Image Search SDK and Java](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-image-search/image-sdk-java-quickstart)
39 | [http://azure.com/java](http://azure.com/java)
40 |
41 | If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
42 |
43 | ---
44 |
45 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
46 |
--------------------------------------------------------------------------------
/Search/BingImageSearch/multiFeatured/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | bing-image-search-java
7 | 1.0.1
8 | BingImageSearchSample.java
9 | Sample for Bing Image Search - Cognitive Services
10 | https://github.com/Azure-Samples/cognitive-services-java-sdk-samples
11 |
12 |
13 |
14 | org.codehaus.mojo
15 | exec-maven-plugin
16 | 1.4.0
17 |
18 | com.microsoft.azure.cognitiveservices.search.imagesearch.samples.BingImageSearchSample
19 | false
20 |
21 |
22 |
23 | maven-compiler-plugin
24 | 3.0
25 |
26 | 1.7
27 | 1.7
28 |
29 |
30 |
31 | maven-assembly-plugin
32 |
33 |
34 | package
35 |
36 | attached
37 |
38 |
39 |
40 | jar-with-dependencies
41 |
42 |
43 |
44 | com.microsoft.azure.cognitiveservices.search.imagesearch.samples.BingImageSearchSample.java
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | UTF-8
55 |
56 |
57 |
58 | com.microsoft.azure
59 | azure
60 | 1.9.0
61 |
62 |
63 | commons-net
64 | commons-net
65 | 3.3
66 |
67 |
68 | com.microsoft.azure.cognitiveservices
69 | azure-cognitiveservices-imagesearch
70 | 1.0.1
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/Search/BingNewsSearch/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Auth filed
4 | *.auth
5 | *.azureauth
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.ear
14 |
15 | # Azure Tooling #
16 | node_modules
17 | packages
18 |
19 | # Eclipse #
20 | *.pydevproject
21 | .project
22 | .metadata
23 | bin/**
24 | tmp/**
25 | tmp/**/*
26 | *.tmp
27 | *.bak
28 | *.swp
29 | *~.nib
30 | local.properties
31 | .classpath
32 | .settings/
33 | .loadpath
34 |
35 | # Other Tooling #
36 | .classpath
37 | .project
38 | target/
39 | .idea
40 | *.iml
41 |
42 | # Mac OS #
43 | .DS_Store
44 | .DS_Store?
45 |
46 | # Windows #
47 | Thumbs.db
48 |
49 | # reduced pom files should not be included
50 | dependency-reduced-pom.xml
51 |
--------------------------------------------------------------------------------
/Search/BingNewsSearch/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Search/BingNewsSearch/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Search/BingNewsSearch/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, bing-news-search
3 | platforms: java
4 | author: milismsft
5 | ---
6 |
7 | # Bing News Search SDK Sample ##
8 |
9 | Sample [code](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/blob/master/Search/BingNewsSearch/src/main/java/com/microsoft/azure/cognitiveservices/search/newssearch/samples/BingNewsSearchSample.java) for searching news using Bing News Search, an Azure Cognitive Service.
10 | - Search the news for "Quantum Computing" with market and count settings and print out the results.
11 | - Search the news for "Artificial Intelligence" with market, freshness and sort-by settings and print out the results.
12 | - Search the news category "Movie and TV Entertainment" with market and safe search settings and print out the results.
13 | - Search the news trending topics with market and print out the results.
14 |
15 |
16 | ## Features
17 |
18 | This project framework provides examples for the **Bing News Search SDK** for the [News Search API](https://azure.microsoft.com/en-us/services/cognitive-services/)
19 |
20 | ## Getting Started
21 |
22 | ### Prerequisites
23 |
24 | - A cognitive services API key with which to authenticate the SDK's calls. [Create a new Azure account, and try Cognitive Services for free.](https://azure.microsoft.com/free/cognitive-services/)
25 | - Maven
26 |
27 | ### Quickstart
28 |
29 | To get these samples running locally, simply get the pre-requisites above, then:
30 |
31 | 1. git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git
32 | 2. cd cognitive-services-java-sdk-samples/Search/BingNewsSearch
33 | 3. Set a system environment variable named `BING_SEARCH_V7_SUBSCRIPTION_KEY` with your subscription key,
34 | then reopen your command prompt or IDE. If not, you might get an API key not found exception.
35 | 4. mvn compile exec:java
36 |
37 | ## More information ##
38 | [Bing News Search API Documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/)
39 |
40 | [Bing News Search API Documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/)
41 | [http://azure.com/java](http://azure.com/java)
42 |
43 | If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
44 |
45 | ---
46 |
47 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
48 |
--------------------------------------------------------------------------------
/Search/BingNewsSearch/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | bing-news-search-java
7 | 1.0.1
8 | BingNewsSearchSample.java
9 | Sample for Bing News Search - Cognitive Services
10 | https://github.com/Azure-Samples/cognitive-services-java-sdk-samples
11 |
12 |
13 |
14 | org.codehaus.mojo
15 | exec-maven-plugin
16 | 1.4.0
17 |
18 | com.microsoft.azure.cognitiveservices.search.newssearch.samples.BingNewsSearchSample
19 | false
20 |
21 |
22 |
23 | maven-compiler-plugin
24 | 3.0
25 |
26 | 1.7
27 | 1.7
28 |
29 |
30 |
31 | maven-assembly-plugin
32 |
33 |
34 | package
35 |
36 | attached
37 |
38 |
39 |
40 | jar-with-dependencies
41 |
42 |
43 |
44 | com.microsoft.azure.cognitiveservices.search.newssearch.samples.BingNewsSearchSample.java
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | UTF-8
55 |
56 |
57 |
58 | com.microsoft.azure
59 | azure
60 | 1.9.0
61 |
62 |
63 | commons-net
64 | commons-net
65 | 3.3
66 |
67 |
68 | com.microsoft.azure.cognitiveservices
69 | azure-cognitiveservices-newssearch
70 | 1.0.1
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/Search/BingVideoSearch/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Auth filed
4 | *.auth
5 | *.azureauth
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.ear
14 |
15 | # Azure Tooling #
16 | node_modules
17 | packages
18 |
19 | # Eclipse #
20 | *.pydevproject
21 | .project
22 | .metadata
23 | bin/**
24 | tmp/**
25 | tmp/**/*
26 | *.tmp
27 | *.bak
28 | *.swp
29 | *~.nib
30 | local.properties
31 | .classpath
32 | .settings/
33 | .loadpath
34 |
35 | # Other Tooling #
36 | .classpath
37 | .project
38 | target/
39 | .idea
40 | *.iml
41 |
42 | # Mac OS #
43 | .DS_Store
44 | .DS_Store?
45 |
46 | # Windows #
47 | Thumbs.db
48 |
49 | # reduced pom files should not be included
50 | dependency-reduced-pom.xml
51 |
--------------------------------------------------------------------------------
/Search/BingVideoSearch/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Search/BingVideoSearch/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Search/BingVideoSearch/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, bing-video-search
3 | platforms: java
4 | author: milismsft
5 | ---
6 |
7 | # Bing Video Search SDK Sample ##
8 |
9 | Sample [code](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/tree/master/Search/BingVideoSearch) for searching news using Bing Video Search, an Azure Cognitive Service.
10 | - Search videos for "SwiftKey" and print out id, name and url.
11 | - Search videos for "Bellevue Trailer" that is free, short and 1080p resolution and print out id, name and url.
12 | - Search for trending videos then verify banner tiles and categories.
13 | - Search videos for "Bellevue Trailer" and then search for detail information of the first video.
14 |
15 | ## Features
16 |
17 | This project framework provides examples for the **Bing Video Search SDK** for the [Video Search API](https://azure.microsoft.com/en-us/services/cognitive-services/)
18 |
19 | ## Getting Started
20 |
21 | ### Prerequisites
22 |
23 | - A cognitive services API key with which to authenticate the SDK's calls. [Create a new Azure account, and try Cognitive Services for free.](https://azure.microsoft.com/free/cognitive-services/)
24 | - Maven
25 |
26 | ### Quickstart
27 |
28 | To get these samples running locally, simply get the pre-requisites above, then:
29 |
30 | 1. git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git
31 | 2. cd cognitive-services-java-sdk-samples/Search/BingVideoSearch
32 | 3. Set a system environment variable named `BING_SEARCH_V7_SUBSCRIPTION_KEY` with your subscription key,
33 | then reopen your command prompt or IDE. If not, you might get an API key not found exception.
34 | 4. mvn compile exec:java
35 |
36 | ## More information ##
37 | [Bing Video Search Documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/Bing-Video-Search/)
38 |
39 | [Bing Video Search Documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/Bing-Video-Search/)
40 | [http://azure.com/java](http://azure.com/java)
41 |
42 | If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
43 |
44 | ---
45 |
46 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
47 |
--------------------------------------------------------------------------------
/Search/BingVideoSearch/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | bing-video-search-java
7 | 1.0.1
8 | BingVideoSearchSample.java
9 | Sample for Bing Video Search - Cognitive Services
10 | https://github.com/Azure-Samples/cognitive-services-java-sdk-samples
11 |
12 |
13 |
14 | org.codehaus.mojo
15 | exec-maven-plugin
16 | 1.4.0
17 |
18 | com.microsoft.azure.cognitiveservices.search.videosearch.samples.BingVideoSearchSample
19 | false
20 |
21 |
22 |
23 | maven-compiler-plugin
24 | 3.0
25 |
26 | 1.7
27 | 1.7
28 |
29 |
30 |
31 | maven-assembly-plugin
32 |
33 |
34 | package
35 |
36 | attached
37 |
38 |
39 |
40 | jar-with-dependencies
41 |
42 |
43 |
44 | com.microsoft.azure.cognitiveservices.search.videosearch.samples.BingVideoSearchSample.java
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | UTF-8
55 |
56 |
57 |
58 | com.microsoft.azure
59 | azure
60 | 1.9.0
61 |
62 |
63 | commons-net
64 | commons-net
65 | 3.3
66 |
67 |
68 | com.microsoft.azure.cognitiveservices
69 | azure-cognitiveservices-videosearch
70 | 1.0.1
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/Search/BingVisualSearch/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore Gradle project-specific cache directory
2 | .gradle
3 | *.class
4 |
5 | # Auth filed
6 | *.auth
7 | *.azureauth
8 |
9 | # Mobile Tools for Java (J2ME)
10 | .mtj.tmp/
11 |
12 | # Package Files #
13 | *.jar
14 | *.war
15 | *.ear
16 |
17 | # Azure Tooling #
18 | node_modules
19 | packages
20 |
21 | # Eclipse #
22 | *.pydevproject
23 | .project
24 | .metadata
25 | bin/**
26 | tmp/**
27 | tmp/**/*
28 | *.tmp
29 | *.bak
30 | *.swp
31 | *~.nib
32 | local.properties
33 | .classpath
34 | .settings/
35 | .loadpath
36 |
37 | # Other Tooling #
38 | .classpath
39 | .project
40 | target/
41 | .idea
42 | *.iml
43 |
44 | # Mac OS #
45 | .DS_Store
46 | .DS_Store?
47 |
48 | # Windows #
49 | Thumbs.db
50 |
51 | # reduced pom files should not be included
52 | dependency-reduced-pom.xml
53 |
54 | # Ignore Gradle build output directory
55 | build
56 |
--------------------------------------------------------------------------------
/Search/BingVisualSearch/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Search/BingVisualSearch/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Search/BingVisualSearch/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, bing-visual-search
3 | platforms: java
4 | author: milismsft
5 | ---
6 |
7 | # Bing Visual Search SDK Sample ##
8 |
9 | Sample code for searching news using Bing Visual Search, an Azure Cognitive Service.
10 | - Search videos for "SwiftKey" and print out id, name and url.
11 | - Search videos for "Bellevue Trailer" that is free, short and 1080p resolution and print out id, name and url.
12 | - Search for trending videos then verify banner tiles and categories.
13 | - Search videos for "Bellevue Trailer" and then search for detail information of the first video.
14 |
15 | ## Features
16 |
17 | This project framework provides examples for the **Bing Visual Search SDK** for the [Visual Search API](https://azure.microsoft.com/en-us/services/cognitive-services/)
18 |
19 | ## Getting Started
20 |
21 | ### Prerequisites
22 |
23 | - A cognitive services API key with which to authenticate the SDK's calls. [Create a new Azure account, and try Cognitive Services for free.](https://azure.microsoft.com/free/cognitive-services/) BE SURE TO USE THE S9 PRICING TIER FOR THE BING SEARCH V7 API FOR VISUAL SEARCH.
24 | - Maven
25 |
26 | ### Quickstart
27 |
28 | To get these samples running locally, simply get the pre-requisites above, then:
29 |
30 | 1. git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git
31 | 2. cd cognitive-services-java-sdk-samples/Search/BingVisualSearch
32 | 3. Set a system environment variable named `BING_SEARCH_V7_SUBSCRIPTION_KEY` with your subscription key,
33 | then reopen your command prompt or IDE. If not, you might get an API key not found exception.
34 | 4. mvn compile exec:java
35 |
36 | ## More information ##
37 |
38 | [Bing Visual Search Documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-visual-search/)
39 | [http://azure.com/java](http://azure.com/java)
40 |
41 | If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
42 |
43 | ---
44 |
45 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
46 |
--------------------------------------------------------------------------------
/Search/BingVisualSearch/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | java
3 | application
4 | }
5 | application {
6 | mainClassName = "main.java.BingVisualSearchSample"
7 | }
8 | repositories {
9 | mavenCentral()
10 | }
11 | dependencies {
12 | compile("org.slf4j:slf4j-simple:1.7.25")
13 | compile("com.microsoft.azure.cognitiveservices:azure-cognitiveservices-visualsearch:1.0.2-beta")
14 | compile("com.google.code.gson:gson:2.8.5")
15 | }
--------------------------------------------------------------------------------
/Search/BingVisualSearch/gradle/config/settings:
--------------------------------------------------------------------------------
1 | # name: Pressing Ctrl-D exits session
2 | # type: bool
3 | # Ctrl-D exits cmd.exe when it is pressed on an empty line.
4 | ctrld_exits = 1
5 |
6 | # name: Toggle if pressing Esc clears line
7 | # type: bool
8 | # Clink clears the current line when Esc is pressed (unless Readline's Vi mode
9 | # is enabled).
10 | esc_clears_line = 1
11 |
12 | # name: Match display colour
13 | # type: int
14 | # Colour to use when displaying matches. A value less than 0 will be the
15 | # opposite brightness of the default colour.
16 | match_colour = -1
17 |
18 | # name: Executable match style
19 | # type: enum
20 | # 0 = PATH only
21 | # 1 = PATH and CWD
22 | # 2 = PATH, CWD, and directories
23 | # Changes how Clink will match executables when there is no path separator on
24 | # the line. 0 = PATH only, 1 = PATH and CWD, 2 = PATH, CWD, and directories. In
25 | # all cases both executables and directories are matched when there is a path
26 | # separator present. A value of -1 will disable executable matching completely.
27 | exec_match_style = 2
28 |
29 | # name: Whitespace prefix matches files
30 | # type: bool
31 | # If the line begins with whitespace then Clink bypasses executable matching and
32 | # will match all files and directories instead.
33 | space_prefix_match_files = 1
34 |
35 | # name: Colour of the prompt
36 | # type: int
37 | # Surrounds the prompt in ANSI escape codes to set the prompt's colour. Disabled
38 | # when the value is less than 0.
39 | prompt_colour = -1
40 |
41 | # name: Auto-answer terminate prompt
42 | # type: enum
43 | # 0 = Disabled
44 | # 1 = Answer 'Y'
45 | # 2 = Answer 'N'
46 | # Automatically answers cmd.exe's 'Terminate batch job (Y/N)?' prompts. 0 =
47 | # disabled, 1 = answer 'Y', 2 = answer 'N'.
48 | terminate_autoanswer = 0
49 |
50 | # name: Lines of history saved to disk
51 | # type: int
52 | # When set to a positive integer this is the number of lines of history that
53 | # will persist when Clink saves the command history to disk. Use 0 for infinite
54 | # lines and <0 to disable history persistence.
55 | history_file_lines = 10000
56 |
57 | # name: Skip adding lines prefixed with whitespace
58 | # type: bool
59 | # Ignore lines that begin with whitespace when adding lines in to the history.
60 | history_ignore_space = 0
61 |
62 | # name: Controls how duplicate entries are handled
63 | # type: enum
64 | # 0 = Always add
65 | # 1 = Ignore
66 | # 2 = Erase previous
67 | # If a line is a duplicate of an existing history entry Clink will erase the
68 | # duplicate when this is set 2. A value of 1 will not add duplicates to the
69 | # history and a value of 0 will always add lines. Note that history is not
70 | # deduplicated when reading/writing to disk.
71 | history_dupe_mode = 2
72 |
73 | # name: Read/write history file each line edited
74 | # type: bool
75 | # When non-zero the history will be read from disk before editing a new line and
76 | # written to disk afterwards.
77 | history_io = 0
78 |
79 | # name: Sets how command history expansion is applied
80 | # type: enum
81 | # 0 = Off
82 | # 1 = On
83 | # 2 = Not in single quotes
84 | # 3 = Not in double quote
85 | # 4 = Not in any quotes
86 | # The '!' character in an entered line can be interpreted to introduce words
87 | # from the history. This can be enabled and disable by setting this value to 1
88 | # or 0. Values or 2, 3 or 4 will skip any ! character quoted in single, double,
89 | # or both quotes respectively.
90 | history_expand_mode = 4
91 |
92 | # name: Support Windows' Ctrl-Alt substitute for AltGr
93 | # type: bool
94 | # Windows provides Ctrl-Alt as a substitute for AltGr, historically to support
95 | # keyboards with no AltGr key. This may collide with some of Readline's
96 | # bindings.
97 | use_altgr_substitute = 1
98 |
99 | # name: Strips CR and LF chars on paste
100 | # type: enum
101 | # 0 = Paste unchanged
102 | # 1 = Strip
103 | # 2 = As space
104 | # Setting this to a value >0 will make Clink strip CR and LF characters from
105 | # text pasted into the current line. Set this to 1 to strip all newline
106 | # characters and 2 to replace them with a space.
107 | strip_crlf_on_paste = 2
108 |
109 | # name: Enables basic ANSI escape code support
110 | # type: bool
111 | # When printing the prompt, Clink has basic built-in support for SGR ANSI escape
112 | # codes to control the text colours. This is automatically disabled if a third
113 | # party tool is detected that also provides this facility. It can also be
114 | # disabled by setting this to 0.
115 | ansi_code_support = 1
116 |
117 |
--------------------------------------------------------------------------------
/Search/BingVisualSearch/gradle/config/user-aliases.cmd:
--------------------------------------------------------------------------------
1 | ;= @echo off
2 | ;= rem Call DOSKEY and use this file as the macrofile
3 | ;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
4 | ;= rem In batch mode, jump to the end of the file
5 | ;= goto:eof
6 | ;= Add aliases below here
7 | e.=explorer .
8 | gl=git log --oneline --all --graph --decorate $*
9 | ls=ls --show-control-chars -F --color $*
10 | pwd=cd
11 | clear=cls
12 | history=cat "%CMDER_ROOT%\config\.history"
13 | unalias=alias /d $1
14 | vi=vim $*
15 | cmderr=cd /d "%CMDER_ROOT%"
16 |
--------------------------------------------------------------------------------
/Search/BingVisualSearch/gradle/config/user-profile.cmd:
--------------------------------------------------------------------------------
1 | :: use this file to run your own startup commands
2 | :: use in front of the command to prevent printing the command
3 |
4 | :: uncomment this to have the ssh agent load when cmder starts
5 | :: call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"
6 |
7 | :: uncomment this next two lines to use pageant as the ssh authentication agent
8 | :: SET SSH_AUTH_SOCK=/tmp/.ssh-pageant-auth-sock
9 | :: call "%GIT_INSTALL_ROOT%/cmd/start-ssh-pageant.cmd"
10 |
11 | :: you can add your plugins to the cmder path like so
12 | :: set "PATH=%CMDER_ROOT%\vendor\whatever;%PATH%"
13 |
14 | @echo off
15 |
--------------------------------------------------------------------------------
/Search/BingVisualSearch/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/Search/BingVisualSearch/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * The settings file is used to specify which projects to include in your build.
5 | *
6 | * Detailed information about configuring a multi-project build in Gradle can be found
7 | * in the user guide at https://docs.gradle.org/5.1.1/userguide/multi_project_builds.html
8 | */
9 |
10 | rootProject.name = "BingVisualSearch"
11 |
--------------------------------------------------------------------------------
/Search/BingVisualSearch/src/main/resources/image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Search/BingVisualSearch/src/main/resources/image.jpg
--------------------------------------------------------------------------------
/Search/BingWebSearch/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Auth filed
4 | *.auth
5 | *.azureauth
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.ear
14 |
15 | # Azure Tooling #
16 | node_modules
17 | packages
18 |
19 | # Eclipse #
20 | *.pydevproject
21 | .project
22 | .metadata
23 | bin/**
24 | tmp/**
25 | tmp/**/*
26 | *.tmp
27 | *.bak
28 | *.swp
29 | *~.nib
30 | local.properties
31 | .classpath
32 | .settings/
33 | .loadpath
34 |
35 | # Other Tooling #
36 | .classpath
37 | .project
38 | target/
39 | .idea
40 | *.iml
41 |
42 | # Mac OS #
43 | .DS_Store
44 | .DS_Store?
45 |
46 | # Windows #
47 | Thumbs.db
48 |
49 | # reduced pom files should not be included
50 | dependency-reduced-pom.xml
51 |
--------------------------------------------------------------------------------
/Search/BingWebSearch/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Search/BingWebSearch/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Search/BingWebSearch/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, bing-web-search
3 | platforms: java
4 | author: milismsft
5 | ---
6 |
7 | # Bing Web Search SDK Sample ##
8 |
9 | Sample [code](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/blob/master/Search/BingWebSearch/src/main/java/com/microsoft/azure/cognitiveservices/search/websearch/samples/BingWebSearchSample.java) for searching web using Bing Web Search, an Azure Cognitive Service.
10 | - Search the web for "Xbox" with market settings and print out the name and url for first web, image, news and videos results.
11 |
12 |
13 | ## Features
14 |
15 | This project framework provides examples for the **Bing Web Search SDK** for the [Web Search API](https://azure.microsoft.com/en-us/services/cognitive-services/)
16 |
17 | ## Getting Started
18 |
19 | ### Prerequisites
20 |
21 | - A cognitive services API key with which to authenticate the SDK's calls. [Create a new Azure account, and try Cognitive Services for free.](https://azure.microsoft.com/free/cognitive-services/)
22 | - Maven
23 |
24 | ### Quickstart
25 |
26 | To get these samples running locally, simply get the pre-requisites above, then:
27 |
28 | 1. git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git
29 | 2. cd cognitive-services-java-sdk-samples/Search/BingWebSearch
30 | 3. Set a system environment variable named `BING_SEARCH_V7_SUBSCRIPTION_KEY` with your subscription key,
31 | then reopen your command prompt or IDE. If not, you might get an API key not found exception.
32 | 4. mvn compile exec:java
33 |
34 | ## More information ##
35 | [Bing Web Search API Documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-web-search/)
36 |
37 | [Bing Web Search API Documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-web-search/)
38 | [http://azure.com/java](http://azure.com/java)
39 |
40 | If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
41 |
42 | ---
43 |
44 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
45 |
--------------------------------------------------------------------------------
/Search/BingWebSearch/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | bing-web-search-java
7 | 1.0.1
8 | BingWebSearchSample.java
9 | Sample for Bing Web Search - Cognitive Services
10 | https://github.com/Azure-Samples/cognitive-services-java-sdk-samples
11 |
12 |
13 |
14 | org.codehaus.mojo
15 | exec-maven-plugin
16 | 1.4.0
17 |
18 | com.microsoft.azure.cognitiveservices.search.websearch.samples.BingWebSearchSample
19 | false
20 |
21 |
22 |
23 | maven-compiler-plugin
24 | 3.0
25 |
26 | 1.7
27 | 1.7
28 |
29 |
30 |
31 | maven-assembly-plugin
32 |
33 |
34 | package
35 |
36 | attached
37 |
38 |
39 |
40 | jar-with-dependencies
41 |
42 |
43 |
44 | com.microsoft.azure.cognitiveservices.search.websearch.samples.BingWebSearchSample.java
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | UTF-8
55 |
56 |
57 |
58 | com.microsoft.azure
59 | azure
60 | 1.9.0
61 |
62 |
63 | commons-net
64 | commons-net
65 | 3.3
66 |
67 |
68 | com.microsoft.azure.cognitiveservices
69 | azure-cognitiveservices-websearch
70 | 1.0.1
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/Vision/ComputerVision/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Vision/ComputerVision/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Vision/ComputerVision/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, computer-vision
3 | platforms: java
4 | author: milismsft
5 | ---
6 |
7 | # Computer Vision SDK Sample
8 |
9 | This sample code uses image classification and object detection on an image with the Computer Vision Cognitive Service. It will retrieve and print information from the image. Maven is used.
10 |
11 | ## Getting Started
12 |
13 | ### Prerequisites
14 | - If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
15 | - Get an [Azure Computer Vision](https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/) account to get your subscription key and endpoint.
16 | - Add COMPUTER_VISION_SUBSCRIPTION_KEY and COMPUTER_VISION_ENDPOINT to your environment variables with your key and endpoint as values.
17 |
18 | ### Clone and run
19 |
20 | Execute from the command line:
21 |
22 | 1. `git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git`
23 | 1. `cd cognitive-services-java-sdk-samples/Vision/ComputerVision`
24 | 1. `mvn compile exec:java -Dexec.cleanupDaemonThreads=false`
25 |
26 | ## More information
27 |
28 | - [Build and deploy Java apps on Azure](http://azure.com/java)
29 | - The [Computer Vision documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/index)
30 |
31 | ---
32 |
33 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
34 |
--------------------------------------------------------------------------------
/Vision/ComputerVision/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | azure-computervision-sample
7 | 0.0.1-SNAPSHOT
8 | ComputerVisionQuickstart.java
9 |
10 | https://github.com/Azure-Samples/cognitive-services-java-sdk-samples
11 |
12 | UTF-8
13 |
14 |
15 |
16 |
17 | org.codehaus.mojo
18 | exec-maven-plugin
19 | 1.4.0
20 |
21 | ComputerVisionQuickstart
22 |
23 |
24 |
25 | maven-assembly-plugin
26 |
27 |
28 | package
29 |
30 | attached
31 |
32 |
33 |
34 | jar-with-dependencies
35 |
36 |
37 |
38 | ComputerVisionQuickstart
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | maven-compiler-plugin
47 | 3.0
48 |
49 | 1.7
50 | 1.7
51 |
52 |
53 |
54 |
55 |
56 |
57 | com.fasterxml.jackson.core
58 | jackson-databind
59 | 2.9.10.7
60 |
61 |
62 | com.microsoft.azure
63 | azure
64 | 1.9.0
65 |
66 |
67 | commons-net
68 | commons-net
69 | 3.3
70 |
71 |
72 | com.microsoft.azure.cognitiveservices
73 | azure-cognitiveservices-computervision
74 | 1.0.2-beta
75 |
76 |
77 | com.microsoft.rest
78 | client-runtime
79 | 1.6.6
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/Vision/ComputerVision/target/classes/ComputerVisionQuickstart.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/ComputerVision/target/classes/ComputerVisionQuickstart.class
--------------------------------------------------------------------------------
/Vision/ComputerVision/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst:
--------------------------------------------------------------------------------
1 | ComputerVisionQuickstart.class
2 |
--------------------------------------------------------------------------------
/Vision/CustomVision/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Azure samples
2 |
3 | Thank you for your interest in contributing to Azure samples!
4 |
5 | ## Ways to contribute
6 |
7 | You can contribute to [Azure samples](https://azure.microsoft.com/documentation/samples/) in a few different ways:
8 |
9 | - Submit feedback on [this sample page](https://azure.microsoft.com/documentation/samples/cognitive-services-java-sdk-samples/) whether it was helpful or not.
10 | - Submit issues through [issue tracker](https://github.com/Azure-Samples/cognitive-services-java-sdk-samples/issues) on GitHub. We are actively monitoring the issues and improving our samples.
11 | - If you wish to make code changes to samples, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the sample repo, make the change and propose it back by submitting a pull request
12 |
--------------------------------------------------------------------------------
/Vision/CustomVision/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Vision/CustomVision/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | services: cognitive-services, custom-vision
3 | platforms: java
4 | author: areddish
5 | ---
6 |
7 | # Custom Vision SDK Sample ##
8 |
9 | Sample code for image classification and object detection for Custom Vision, an Azure Cognitive Service.
10 | - Creates an image classification project, upload images, train it and make a prediction.
11 | - Creates an object detection project, upload images, train it and make a prediction.
12 |
13 | ## Features
14 |
15 | This project framework provides examples for the **Custom Vision SDK** for the [Custom Vision API](https://azure.microsoft.com/en-us/services/cognitive-services/custom-vision-service/)
16 |
17 | ## Getting Started
18 |
19 | ### Prerequisites
20 |
21 | - An account at [Custom Vision Service](https://www.customvision.ai)
22 | - Maven
23 |
24 | ### Quickstart
25 |
26 | To get these samples running locally, simply get the pre-requisites above, then:
27 |
28 | 1. git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git
29 | 2. cd cognitive-services-java-sdk-samples/Vision/CustomVision
30 | 3. set env variable AZURE_CUSTOMVISION_TRAINING_API_KEY to your cognitive services TRAINING API key.
31 | 4. set env variable AZURE_CUSTOMVISION_PREDICTION_API_KEY to your cognitive services PREDICTION API key.
32 | 5. mvn compile exec:java
33 |
34 | ## More information ##
35 |
36 | [http://azure.com/java](http://azure.com/java)
37 |
38 | If you don't have a Microsoft Azure subscription you can visit [the Microsoft Cognitive Services Web site](https://azure.microsoft.com/free/cognitive-services/), create a new Azure account, and try Cognitive Services for free.
39 |
40 | ---
41 |
42 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
43 |
--------------------------------------------------------------------------------
/Vision/CustomVision/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.microsoft.azure
6 | custom-vision-java
7 | 1.0.2
8 | Samples.java
9 | Sample for Custom Vision - Cognitive Services
10 | https://github.com/Azure-Samples/cognitive-services-java-sdk-samples
11 |
12 |
13 |
14 | org.codehaus.mojo
15 | exec-maven-plugin
16 | 1.4.0
17 |
18 | com.microsoft.azure.cognitiveservices.vision.customvision.samples.CustomVisionSamples
19 |
20 |
21 |
22 | maven-compiler-plugin
23 | 3.0
24 |
25 | 1.7
26 | 1.7
27 |
28 |
29 |
30 | maven-assembly-plugin
31 |
32 |
33 | package
34 |
35 | attached
36 |
37 |
38 |
39 | jar-with-dependencies
40 |
41 |
42 |
43 | com.microsoft.azure.cognitiveservices.vision.customvision.samples.CustomVisionSamples.java
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | com.microsoft.azure
55 | azure
56 | 1.9.0
57 |
58 |
59 | commons-net
60 | commons-net
61 | 3.3
62 |
63 |
64 | com.azure
65 | azure-cognitiveservices-customvision-training
66 | 1.1.0-preview.2
67 |
68 |
69 | com.azure
70 | azure-cognitiveservices-customvision-prediction
71 | 1.1.0-preview.2
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Hemlock/hemlock_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Hemlock/hemlock_1.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Hemlock/hemlock_10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Hemlock/hemlock_10.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Hemlock/hemlock_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Hemlock/hemlock_2.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Hemlock/hemlock_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Hemlock/hemlock_3.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Hemlock/hemlock_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Hemlock/hemlock_4.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Hemlock/hemlock_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Hemlock/hemlock_5.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Hemlock/hemlock_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Hemlock/hemlock_6.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Hemlock/hemlock_7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Hemlock/hemlock_7.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Hemlock/hemlock_8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Hemlock/hemlock_8.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Hemlock/hemlock_9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Hemlock/hemlock_9.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_1.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_10.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_2.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_3.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_4.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_5.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_6.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_7.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_8.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Japanese Cherry/japanese_cherry_9.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/ObjectTest/test_image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/ObjectTest/test_image.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/Test/test_image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/Test/test_image.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_1.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_10.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_11.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_12.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_13.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_13.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_14.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_14.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_15.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_15.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_16.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_16.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_17.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_17.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_18.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_18.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_19.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_19.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_2.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_20.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_20.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_3.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_4.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_5.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_6.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_7.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_8.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/fork/fork_9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/fork/fork_9.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_1.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_10.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_11.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_12.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_13.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_13.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_14.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_14.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_15.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_15.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_16.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_16.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_17.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_17.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_18.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_18.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_19.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_19.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_2.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_20.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_20.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_3.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_4.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_5.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_6.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_7.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_8.jpg
--------------------------------------------------------------------------------
/Vision/CustomVision/src/main/resources/scissors/scissors_9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-java-sdk-samples/7c0c64a9db88549c0ef6dba020fa7ff4c32f8a03/Vision/CustomVision/src/main/resources/scissors/scissors_9.jpg
--------------------------------------------------------------------------------
/documentation-samples/quickstarts/LUIS/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
10 | 4.0.0
11 |
12 | com.foo
13 | bar
14 | 0.0.1-SNAPSHOT
15 |
16 |
17 |
18 |
19 |
20 | com.microsoft.azure.cognitiveservices
21 | azure-cognitiveservices-luis-authoring
22 | 1.0.2-beta
23 |
24 |
25 |
30 |
31 | org.slf4j
32 | slf4j-jdk14
33 | 1.7.25
34 |
35 |
36 |
37 |
38 |
39 | lib
40 |
41 |
42 | org.apache.maven.plugins
43 | maven-dependency-plugin
44 |
45 |
46 | ${project.build.directory}
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------