public void TestTemperature() { var model = NumberWithUnitRecognizer.GetTemperatureModel(Culture.Spanish); BasicTest(model, "La temperatura exterior es de 40 grados Celsius", "40 Grado Celsius"); BasicTest(model, "Hace 90 fahrenheit en Texas", "90 Grado Fahrenheit"); BasicTest(model, "Convertir 10 celsius a fahrenheit", new string[] { "10 Grado Celsius", "Grado Fahrenheit" }); BasicTest(model, "-5 grados Fahrenheit", "-5 Grado Fahrenheit"); BasicTest(model, "6 grados centígrados", "6 Grado Celsius"); BasicTest(model, "98,6 grados f es temperatura normal", "98,6 Grado Fahrenheit"); BasicTest(model, "Ajuste la temperatura a 30 grados celsius", "30 Grado Celsius"); BasicTest(model, "La temperatura normal es 98,6 grados Fahrenheit", "98,6 Grado Fahrenheit"); BasicTest(model, "100 grados f", "100 Grado Fahrenheit"); BasicTest(model, "20 Grados c", "20 Grado Celsius"); BasicTest(model, "100 °f", "100 Grado Fahrenheit"); BasicTest(model, "20 °c", "20 Grado Celsius"); BasicTest(model, "100,2 Grados Fahrenheit es bajo", "100,2 Grado Fahrenheit"); BasicTest(model, "34,9 centígrado a fahrenheit", new string[] { "34,9 Grado Celsius", "Grado Fahrenheit" }); BasicTest(model, "convertir 200 celsius celsius en fahrenheit", new string[] { "200 Grado Celsius", "Grado Celsius", "Grado Fahrenheit" }); BasicTest(model, "convertir 200 K en fahrenheit", new string[] { "200 Kelvin", "Grado Fahrenheit" }); BasicTest(model, "fahrenheit a celsius, cuantos celsius son 101 fahrenheit", new string[] { "101 Grado Fahrenheit", "Grado Fahrenheit", "Grado Celsius", "Grado Celsius" }); BasicTest(model, "50 grados centígrados celsius a fahrenheit", new string[] { "50 Grado Celsius", "Grado Celsius", "Grado Fahrenheit" }); BasicTest(model, "Podría convertir 51 fahrenheit en grados celsius", new string[] { "51 Grado Fahrenheit", "Grado Celsius" }); BasicTest(model, "Convertir 106 grados Fahrenheit a grados centígrados", new string[] { "106 Grado Fahrenheit", "Grado Celsius" }); BasicTest(model, "Convertir 106 K a grados centígrados", new string[] { "106 Kelvin", "Grado Celsius" }); BasicTest(model, "Convertir 45 grados Fahrenheit a Celsius", new string[] { "45 Grado Fahrenheit", "Grado Celsius" }); BasicTest(model, "Cómo convertir - 20 grados Fahrenheit a Celsius", new string[] { "-20 Grado Fahrenheit", "Grado Celsius" }); BasicTest(model, "10,5 celsius", "10,5 Grado Celsius"); BasicTest(model, "20 grados celsius", "20 Grado Celsius"); BasicTest(model, "20,3 celsius", "20,3 Grado Celsius"); BasicTest(model, "34,5 celsius", "34,5 Grado Celsius"); BasicTest(model, "La temperatura exterior es de 98 grados", "98 Grado"); BasicTest(model, "Ajuste el termostato a 85 °", "85 Grado"); BasicTest(model, "Ajuste el termostato a 85°", "85 Grado"); BasicTest(model, "Aumentar la temperatura en 5 grados", "5 Grado"); BasicTest(model, "Ajuste la temperatura a 70 grados f", "70 Grado Fahrenheit"); BasicTest(model, "Aumentar la temperatura en 20 grados", "20 Grado"); BasicTest(model, "Ajuste la temperatura a 100 grados", "100 Grado"); BasicTest(model, "Ajuste la temperatura a 100 Kelvin", "100 Kelvin"); BasicTest(model, "Mantener la temperatura a 75 grados f", "75 Grado Fahrenheit"); BasicTest(model, "Deje que la temperatura esté a 40 centígrados", "40 Grado Celsius"); BasicTest(model, "Deje que la temperatura esté a 50 grados.", "50 Grado"); }
public void TestTemperature() { var model = NumberWithUnitRecognizer.GetTemperatureModel(Culture.English); BasicTest(model, "the temperature outside is 40 deg celsius", "40 C"); BasicTest(model, "its 90 fahrenheit in texas", "90 F"); BasicTest(model, "-5 degree fahrenheit", "-5 F"); BasicTest(model, "6 deg c", "6 C"); BasicTest(model, "98.6 degrees f is normal temperature", "98.6 F"); BasicTest(model, "set the temperature to 30 degrees celsius", "30 C"); BasicTest(model, "normal temperature is 98.6 degrees fahrenheit", "98.6 F"); BasicTest(model, "100 degrees f", "100 F"); BasicTest(model, "20 degrees c", "20 C"); BasicTest(model, "100.2 degrees farenheit is low", "100.2 F"); BasicTest(model, "10.5 celcius", "10.5 C"); BasicTest(model, "20 degrees celsius", "20 C"); BasicTest(model, "20.3 celsius", "20.3 C"); BasicTest(model, "34.5 celcius", "34.5 C"); BasicTest(model, "the temperature outside is 98 degrees", "98 Degree"); BasicTest(model, "set the thermostat to 85°", "85 Degree"); BasicTest(model, "raise the temperature by 5 degrees", "5 Degree"); BasicTest(model, "set the temperature to 70 degrees f", "70 F"); BasicTest(model, "raise the temperature by 20 degrees", "20 Degree"); BasicTest(model, "set the temperature to 100 degrees", "100 Degree"); BasicTest(model, "keep the temperature at 75 degrees f", "75 F"); BasicTest(model, "let the temperature be at 40 celsius", "40 C"); BasicTest(model, "let the temperature be at 50 deg. ", "50 Degree"); BasicTest(model, "convert 10 celsius to fahrenheit", new string[] { "10 C", "F" }); BasicTest(model, "34.9 centigrate to farenheit", new string[] { "34.9 C", "F" }); BasicTest(model, "convert 200 celsius celsius into fahrenheit", new string[] { "200 C", "C", "F" }); BasicTest(model, "fahrenheit to celsius 101 fahrenheit is how much celsius", new string[] { "101 F", "F", "C", "C" }); BasicTest(model, "50 degrees celsius celsius to fahrenheit", new string[] { "50 C", "C", "F" }); BasicTest(model, "could you convert 51 fahrenheit to degrees celsius", new string[] { "51 F", "C" }); BasicTest(model, "convert 106 degree fahrenheit to degrees celsius", new string[] { "106 F", "C" }); BasicTest(model, "convert 45 degrees fahrenheit to celsius", new string[] { "45 F", "C" }); BasicTest(model, "how to convert - 20 degrees fahrenheit to celsius", new string[] { "-20 F", "C" }); }
public void TestTemperature() { var model = NumberWithUnitRecognizer.GetTemperatureModel(Culture.Chinese); }