-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compose and execute disjunction of basic patterns (#5)
## Summary of Changes - Support compilation and execution of a disjunction of "basic" Odinson patterns - POST `/api/execute/grammar` now takes a YAML grammar as the its text-based body w/ options specified via query params - Changes to Mention JSON response: - `text` attributes and complete spans ### Related issues - See https://gist.github.com/myedibleenso/bb383ba5ad6267eccfa7a46be7156c46
- Loading branch information
1 parent
238ab09
commit c3980b7
Showing
17 changed files
with
738 additions
and
257 deletions.
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
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
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
19 changes: 19 additions & 0 deletions
19
app/ai/lum/odinson/rest/requests/SimplePatternsRequest.scala
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,19 @@ | ||
package ai.lum.odinson.rest.requests | ||
|
||
import play.api.libs.json._ | ||
|
||
case class SimplePatternsRequest( | ||
patterns: List[String], | ||
metadataQuery: Option[String] = None, | ||
// label: Option[String] = None, | ||
// commit: Option[Boolean] = None, | ||
prevDoc: Option[Int] = None, | ||
prevScore: Option[Float] = None, | ||
enriched: Option[Boolean] = None, | ||
pretty: Option[Boolean] = None | ||
) | ||
|
||
object SimplePatternsRequest { | ||
implicit val fmt: OFormat[SimplePatternsRequest] = Json.format[SimplePatternsRequest] | ||
implicit val read: Reads[SimplePatternsRequest] = Json.reads[SimplePatternsRequest] | ||
} |
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
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,3 @@ | ||
package ai.lum.odinson.rest.utils | ||
|
||
case class StartEnd(start: Int, end: Int) |
Oops, something went wrong.