当数组是json的顶层时,如何引用“ $ schema”?

时间:2019-09-16 02:40:19

标签: json jsonschema

例如,我定义了一个名为{ "$schema": "http://json-schema.org/draft-07/schema", "type": "array", "items": { "type": "array" } } 的架构,例如:

{"$schema": "../stringArray.json"}

当我编写json时,如何引用架构文件,例如使用# extract_tokens.py def extract_tokens(text,ngrams,stem): """This function takes selftext from a Reddit post, strips URLs, newline formatting strings, and non alphabetic characters, removes stopwords, and returns a lower case list of words """ import re from nltk.corpus import stopwords as sw from nltk.stem.snowball import SnowballStemmer text=text.lower() ... # Remove stopwords (from nltk) s_words=sw.words('english') if stem==1: Stemmer=SnowballStemmer("english")

0 个答案:

没有答案