Name Ethnicity Classifier


About

The ethnicity classifier was developed at the Computer Science Department, Stony Brook University under the guidance of Prof. Steven Skiena. In this project, we tried to aggregate entities into different ethnic groups. We formed a hierarchical structure of ethnicities and then used our classifier to predict the ethnicity of a given name at different levels of this decision tree. The training data was obtained from Wikipedia.


This Web-UI allows the user to enter a name or a set of names which can then be classified into appropriate ethnic groups by our classifier model.


The techniques used in our classification are detailed in:

Ambekar, A., Ward, C., Mohammed, J., Male, S., and Skiena, S. 2009. Name-ethnicity classification from open sources. In Proceedings of the 15th ACM SIGKDD international Conference on Knowledge Discovery and Data Mining (Paris, France, June 28 - July 01, 2009). KDD '09. ACM, New York, NY, 49-58. DOI= http://doi.acm.org/10.1145/1557019.1557032


Demo

Please enter names (1 name per line):



API

This classification tool is also available via a web API. Send a POST request containing the names to be classified to textmap.com/ethnicity_api/api.

Please limit your request to 2000 names at a time.

Javascript (JQuery) Example:
				$.ajax({
				    type: "POST",
				    url: "www.textmap.com/ethnicity_api/api",
				    data: JSON.stringify(
				        { "names" : [ "George Washington", "John Smith", "Barack Obama" ] }
				    ),
				    success: function (data) {
				        console.log(data);
				    },
				    dataType: "json"
				});
				


Response:
{
    "George Washington": [
        { "scores":
            [ {"score": "0.07", "ethnicity": "Asian"},
              {"score": "0.00", "ethnicity": "GreaterAfrican"},
              {"score": "0.93", "ethnicity": "GreaterEuropean"}],
          "best":"GreaterEuropean" },
        { "scores":
            [ {"score": "1.00", "ethnicity": "British"},
              {"score": "0.00", "ethnicity": "Jewish"}, 
              {"score": "0.00", "ethnicity": "WestEuropean"}, 
              {"score": "0.00", "ethnicity": "EastEuropean"}],
          "best":"British" }
    ],
    "John Smith": [
        { "scores":
            [ {"score": "0.00", "ethnicity": "Asian"},
              {"score": "0.00", "ethnicity": "GreaterAfrican"},
              {"score": "1.00", "ethnicity": "GreaterEuropean"}],
          "best":"GreaterEuropean" },
        { "scores":
            [ {"score": "1.00", "ethnicity": "British"},
              {"score": "0.00", "ethnicity": "Jewish"},
              {"score": "0.00", "ethnicity": "WestEuropean"},
              {"score": "0.00", "ethnicity": "EastEuropean"}],
          "best": "British" }
    ],
    "Barack Obama": [
        { "scores":
            [ {"score": "0.00", "ethnicity": "Asian"},
              {"score": "1.00", "ethnicity": "GreaterAfrican"},
              {"score": "0.00", "ethnicity": "GreaterEuropean"}],
          "best":"GreaterAfrican"},
        {"scores":
            [ {"score": "1.00", "ethnicity": "Africans"},
              {"score": "0.00", "ethnicity": "Muslim"}],
          "best":"Africans"}
    ]
}