Skip to content

Instantly share code, notes, and snippets.

{
"entities": [
{
"name": "隴西",
"type": "PERSON",
"metadata": {},
"salience": 0,
"mentions": [
{
"text": {
{
"document": {
"type": "PLAIN_TEXT", // PLAIN_TEXTやHTMLなど
"language": "JA", // 言語。今回は日本語なのでJA
"content": "xxxxx" // ここに解析した文を入れる
},
"encodingType": "UTF8" // 文字コード。今回はUTF8
}
package main
import (
"fmt"
)
func main() {
defer fmt.Println("execute this statement thirdly")
defer fmt.Println("execute this statement secondly")
package main
import (
"fmt"
"log"
"strconv"
"os"
"database/sql"
_ "github.com/go-sql-driver/mysql"
package main
import (
"fmt"
)
func Reverse(s string) string {
t := make([]rune, len(s))
for i, c := range s {
t[len(s) - i- 1] = c
package main
import (
"fmt"
)
func main() {
var s string = "パタトクカシーー"
t := []rune(s)
package main
import (
"fmt"
)
func AltnativeConnect(s1, s2 string) string {
// len(s1) = len(s2)
t := make([]rune, len(s1) + len(s2))
package main
import (
"fmt"
"strings"
)
func main() {
var s string = "Now I need a drink, alcoholic of course, after the heavy lectures involving quantum mechanics."
s = strings.Replace(s, ".", "", -1)
package main
import (
"fmt"
"strings"
)
func main() {
var s string = "Hi He Lied Because Boron Could Not Oxidize Fluorine. New Nations Might Also Sign Peace Security Clause. Arthur King Can."
s = strings.Replace(s, ".", "", -1)
package main
import (
"fmt"
"strings"
)
func makeCharngram(s []rune, n int) [][]rune {
t := make([][]rune, len(s) - n + 1)