diff --git a/website/src/jade/home/_usage.jade b/website/src/jade/home/_usage.jade index 12dc9e2a5..15e73a568 100644 --- a/website/src/jade/home/_usage.jade +++ b/website/src/jade/home/_usage.jade @@ -6,13 +6,16 @@ mixin example(name) +example("Load resources and process text") - include:doctest_all ../../../tests/test_load_resources_and_process_text.txt + pre.language-python: code + include ../../code/home.load_resources_and_process_text +example("Get tokens and sentences") - include:doctest ../../../tests/test_get_tokens_and_sentences.txt + pre.language-python: code + include ../../code/home.get_tokens_and_sentences +example("Use integer IDs for any string") - include:doctest ../../../tests/test_use_interger_ids_for_any_strings.txt + pre.language-python: code + include ../../code/home.use_integer_ids_for_any_strings +example("Get and set string views and flags") pre.language-python: code diff --git a/website/tests/test_get_tokens_and_sentences.txt b/website/tests/test_get_tokens_and_sentences.txt deleted file mode 100644 index e649a6f6d..000000000 --- a/website/tests/test_get_tokens_and_sentences.txt +++ /dev/null @@ -1,8 +0,0 @@ ->>> from spacy.en import English ### ->>> nlp = English() ### ->>> doc = nlp(u'Hello, world. Here are two sentences.') ### ->>> ->>> token = doc[0] ->>> sentence = doc.sents.next() ->>> assert token is sentence[0] ->>> assert sentence.text == 'Hello, world.' diff --git a/website/tests/test_load_resources_and_process_text.txt b/website/tests/test_load_resources_and_process_text.txt deleted file mode 100644 index 9937be1b0..000000000 --- a/website/tests/test_load_resources_and_process_text.txt +++ /dev/null @@ -1,5 +0,0 @@ ->>> from spacy.en import English ->>> nlp = English() ->>> doc = nlp(u'Hello, world. Here are two sentences.') ->>> print([s.string for s in doc.sents]) -[u'Hello, world. ', u'Here are two sentences.'] diff --git a/website/tests/test_use_interger_ids_for_any_strings.txt b/website/tests/test_use_interger_ids_for_any_strings.txt deleted file mode 100644 index ec66c2729..000000000 --- a/website/tests/test_use_interger_ids_for_any_strings.txt +++ /dev/null @@ -1,10 +0,0 @@ ->>> from spacy.en import English ### ->>> nlp = English() ### ->>> doc = nlp(u'Hello, world. Here are two sentences.') ### ->>> token = doc[0] ### ->>> ->>> hello_id = nlp.vocab.strings['Hello'] ->>> hello_str = nlp.vocab.strings[hello_id] ->>> ->>> assert token.orth == hello_id == 469755 ->>> assert token.orth_ == hello_str == 'Hello'