All public gists in this account are Public Domain unless a separate license is included in the Gist.
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
let func = | |
(Table as table, optional Step as number, optional SelectedColumns, optional GroupByColumns, optional Suffix as text, optional Buffer as any) => | |
let | |
// Steps to prepare the (optional) parameters for the nested function "fnFetchNextRow" | |
Source = if Buffer = null then Table else Table.Buffer(Table), | |
Step0 = if Step = null then -1 else Step, | |
Step_ = if Step = null then 1 else Number.Abs(Step), | |
Suffix = if Suffix = null then ".Prev" else Suffix, | |
GroupByColumns = if GroupByColumns = null then null else GroupByColumns, |
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
shared Character.FromHtmlEntity = (entity as text) => | |
let | |
list = | |
{ | |
[Name="Agrave", Number=192] | |
, [Name="Aacute", Number=193] | |
, [Name="Acirc", Number=194] | |
, [Name="Atilde", Number=195] | |
, [Name="Auml", Number=196] | |
, [Name="Aring", Number=197] |
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
extractChunks <- function(x) { | |
x <- as.String(x) | |
wordAnnotation <- annotate(x, list(Maxent_Sent_Token_Annotator(), Maxent_Word_Token_Annotator())) | |
POSAnnotation <- annotate(x, Maxent_POS_Tag_Annotator(), wordAnnotation) | |
POSwords <- subset(POSAnnotation, type == "word") | |
tags <- sapply(POSwords$features, '[[', "POS") | |
tokenizedAndTagged <- data.frame(Tokens = x[POSwords], Tags = tags) | |
tokenizedAndTagged$Tags_mod = grepl("NN|JJ", tokenizedAndTagged$Tags) |
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
POLYGON((112.76 -10.23, 155.48 -10.23, 155.48 -44.28, 112.76 -44.28, 112.76 -10.23)) |