Updated ReadMe & Contributing (#2)

This commit is contained in:
Allison Light 2016-07-06 11:07:52 -07:00 коммит произвёл GitHub
Родитель 97b9953f3d
Коммит 06e5ad9bdf
2 изменённых файлов: 48 добавлений и 61 удалений

Просмотреть файл

@ -1,18 +1,14 @@
Contributing to Microsoft Cognitive Services Client Libraries
Contributing to Microsoft Cognitive Services Client Libraries & Samples
===============================================
So, you want to contribute on a client SDK for one of the Microsoft Cognitive Services.
So, you want to contribute on a client library or sample for one of the Microsoft Cognitive Services.
Here's what you need to know.
1. Each SDK must include both a client library and a sample showing the API in
1. Each SDK should include both a client library and a sample showing the API in
action
2. When building an SDK, it's important you support the most common development
platforms and that we are consistent from project to project. We require you
to build the following, using the associated coding guidelines, in priority
order:
2. When working on an SDK, it's important that we are consistent from project to project, so we ask you to follow the coding guidelines below:
- .NET (Coding guidelines below)
- Windows [(Coding guidelines for C#)](https://msdn.microsoft.com/en-us/library/ff926074.aspx) -- also reference our [common Windows code](https://github.com/Microsoft/Cognitive-common-windows) for building samples
- Android [(Coding guidelines for
Java)](<http://source.android.com/source/code-style.html>)
@ -26,29 +22,24 @@ Here's what you need to know.
3. Samples are important for illustrating how to actually call into the API.
Samples should be as visual and reusable as possible.
Do:
- Do:
- Create a UI sample when possible.
- Create a UI sample when possible.
- Make your sample user friendly. Expect that developers will want to try
- Make your sample user friendly. Expect that developers will want to try
different mainline scenarios and key APIs.
- Create code that's easy for other developers to copy/paste into their
- Create code that's easy for other developers to copy/paste into their
own solutions
Consider:
- Consider:
- Adding UI to allow devs to quickly copy/paste subscription keys, instead
- Adding UI to allow devs to quickly copy/paste subscription keys, instead
of updating them in the code or using a config file. The
FaceAPI-WPF-Samples.sln provides an example.
Don't:
- Don't:
- Leave your subscription key in the source of samples. You do not want
your key to be abused by others.
- Leave your subscription key in the source of samples. You do not want your key to be abused by others.
4. Always create a README.md for your top-level API root and for each platform.
- Use the existing README.md files as a reference for what information is
useful here. In general, you want to describe the functionality of the
API as well as specifics for how to build and run the project(s).
Happy coding!

Просмотреть файл

@ -1,8 +1,13 @@
The client library
==================
# Microsoft Emotion API: Android Client Library & Sample
This repo contains the Android client library & sample for the Microsoft Emotion API, an offering within [Microsoft Cognitive Services](https://www.microsoft.com/cognitive-services), formerly known as Project Oxford.
* [Learn about the Emotion API](https://www.microsoft.com/cognitive-services/en-us/emotion-api)
* [Read the documentation](https://www.microsoft.com/cognitive-services/en-us/emotion-api/documentation)
* [Find more SDKs & Samples](https://www.microsoft.com/cognitive-services/en-us/SDK-Sample?api=emotion)
The Emotion API client library is a thin Java client wrapper for Microsoft Cognitive Services (formerly Project Oxford)
Emotion REST APIs.
## The client library
This client library is a thin Java client wrapper for the Microsoft Emotion REST API.
The easiest way to consume the client library is to add com.microsoft.projectoxford.emotion package from Maven Central Repository.
@ -23,18 +28,16 @@ dependencies {
```
To do add the client library dependency from Android Studio:
1. From Menu, Choose File \> Project Structure
2. Click on your app module
3. Click on Dependencies tab
4. Click "+" sign to add new dependency
5. Pick "Library dependency" from the drop down list
6. Type "com.microsoft.projectoxford" and hit the search icon from "Choose Library Dependency" dialog
7. Pick the Project Oxford client library that you intend to use.
8. Click "OK" to add the new dependency
Order expressions
============
1. From Menu, Choose File \> Project Structure
2. Click on your app module
3. Click on Dependencies tab
4. Click "+" sign to add new dependency
5. Pick "Library dependency" from the drop down list
6. Type "com.microsoft.projectoxford" and hit the search icon from "Choose Library Dependency" dialog
7. Pick the Project Oxford client library that you intend to use.
8. Click "OK" to add the new dependency
### Order expressions
You can call the function ToRankedList from the Scores class, for example:
ASCENDING
@ -48,22 +51,16 @@ List<Map.Entry<String, Double>> collection = scores.ToRankedList(Order.DESCENDIN
```
The sample
==========
## The sample
This sample is an Android application to demonstrate the use of Emotion API.
It demonstrates emotion detection from an image. It can identify people's faces and interpret their emotions.
Requirements
------------
### Requirements
Android OS must be Android 4.1 or higher (API Level 16 or higher)
Build the sample
----------------
1. You must obtain a subscription key for Emotion API and Face API by following instructions in https://www.microsoft.com/cognitive-services. Please note that Emotion API and Face API
### Build the sample
1. You must obtain a subscription key for Emotion API and Face API by [following instructions on our website]( https://www.microsoft.com/cognitive-services/en-us/sign-up). Please note that Emotion API and Face API
requires two different subscriptions.
2. Start Android Studio and open project from Emotion \> Android \> Sample folder.
@ -81,9 +78,7 @@ requires two different subscriptions.
<img src="SampleScreenshots/SampleRunning1.png" width="30%"/>
<img src="SampleScreenshots/SampleRunning2.png" width="30%"/>
Run the sample
--------------
### Run the sample
In Android Studio, select menu "Run", and "Run app" to launch this sample app.
Once the app is launched, click on buttons to use samples of between different
@ -95,20 +90,21 @@ from everyone in it.
If you want to know what is the name of the expression with more value then you might call getExpressionName() from the Score class
Contributing
============
We welcome contributions and are always looking for new SDKs, input, and
suggestions. Feel free to file issues on the repo and we'll address them as we can. You can also learn more about how you can help on the [Contribution
Rules & Guidelines](</CONTRIBUTING.md>).
## Contributing
We welcome contributions. Feel free to file issues and pull requests on the repo and we'll address them as we can. Learn more about how you can help on our [Contribution Rules & Guidelines](</CONTRIBUTING.md>).
For questions, feedback, or suggestions about Microsoft Cognitive Services, feel free to reach out to us directly.
You can reach out to us anytime with questions and suggestions using our communities below:
- **Support questions:** [StackOverflow](<https://stackoverflow.com/questions/tagged/microsoft-cognitive>)
- **Feedback & feature requests:** [Cognitive Services UserVoice Forum](<https://cognitive.uservoice.com>)
- [Cognitive Services UserVoice Forum](<https://cognitive.uservoice.com>)
License
=======
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.
## License
All Microsoft Cognitive Services SDKs and samples are licensed with the MIT License. For more details, see
[LICENSE](</LICENSE.md>).
Sample images are licensed separately, please refer to [LICENSE-IMAGE](</LICENSE-IMAGE.md>).
## Developer Code of Conduct
Developers using Cognitive Services, including this client library & sample, are expected to follow the “Developer Code of Conduct for Microsoft Cognitive Services”, found at [http://go.microsoft.com/fwlink/?LinkId=698895](http://go.microsoft.com/fwlink/?LinkId=698895).