This repository has been archived by the owner on May 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pick states over tiny cities (Oklahoma), but pick big cities over sta…
…tes (Sao Paulo) #28
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/test/java/org/mediameter/cliff/test/places/disambiguation/OklahomaPlaceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.mediameter.cliff.test.places.disambiguation; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import java.util.List; | ||
|
||
import org.junit.Test; | ||
import org.mediameter.cliff.ParseManager; | ||
import org.mediameter.cliff.test.util.TestPlaces; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import com.bericotech.clavin.resolver.ResolvedLocation; | ||
|
||
public class OklahomaPlaceTest { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(OklahomaPlaceTest.class); | ||
|
||
@Test | ||
public void testOklahoma() throws Exception { | ||
List<ResolvedLocation> results = ParseManager.extractAndResolve("Oklahoma say Common Core tests are too costly.").getResolvedLocations(); | ||
assertEquals("Found "+results.size()+" places, should have been 1!",1,results.size()); | ||
assertEquals(TestPlaces.STATE_OKLAHOMA, results.get(0).geoname.geonameID); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters