Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeat words with a specific tag only #204

Open
hhzl opened this issue Jun 1, 2017 · 0 comments
Open

Repeat words with a specific tag only #204

hhzl opened this issue Jun 1, 2017 · 0 comments

Comments

@hhzl
Copy link
Owner

hhzl commented Jun 1, 2017

Currently the content of a wordsToRepeat collection in a session is determined by the success or failure of a previous query.

As an alternative allow the wordsToRepeat collection to only contain cards which have a specific tag.

Notes:

  • A card may have several tags.
  • Tags are in a string value and separated by space

Any tag system may be used, e.g. instead of going for domains 'lesson01', 'lesson02' could be used as well.

Example

Instead of the spaced repetition algorithm to choose the words to repeat the choice is determined by a particular tag, in the example either 'mammal', 'bird' or 'otherAnimal'.

A word list example with the tags "mammal", "bird" or "otherAnimal" (YAML):
https://www.json2yaml.com/yaml-vs-json

---
- _id: 1
  word: antelope
  translate: 羚羊
  tags: mammal
  picture: c10/antelope.jpg
- _id: 2
  word: ant
  translate: 螞蟻
  tags: otherAnimal
  picture: c10/ant.jpg
- _id: 3
  word: baboon
  translate: 狒狒
  tags: mammal
  picture: c10/baboon.jpg
- _id: 4
  word: bat
  translate: 蝙蝠
  tags: mammal
  picture: c10/bat.jpg
- _id: 5
  word: butterfly
  translate: 蝴蝶
  tags: otherAnimal
  picture: c10/butterfly.jpg
- _id: 6
  word: calf
  translate: 小牛
  tags: mammal
  picture: c10/calf.jpg
- _id: 7
  word: camel
  translate: 駱駝
  tags: mammal
  picture: c10/camel.jpg
- _id: 8
  word: cat
  translate: 
  tags: mammal
  picture: c10/cat.jpg
- _id: 9
  word: chameleon
  translate: 變色龍
  tags: otherAnimal
  picture: c10/chameleon.jpg
- _id: 10
  word: coucal
  translate: 褐翅鴉鵑
  tags: bird
  picture: c10/coucal_bird.jpg
- _id: 11
  word: crocodile
  translate: 鱷魚
  tags: otherAnimal
  picture: c10/crocodile.jpg
- _id: 12
  word: dog
  translate: 
  tags: mammal
  picture: c10/dog.jpg
- _id: 13
  word: donkey
  translate: 
  tags: mammal
  picture: c10/donkey.jpg
- _id: 14
  word: duck
  translate: 
  tags: bird
  picture: c10/duck.jpg
- _id: 15
  word: eagle
  translate: 
  tags: bird
  picture: c10/eagle.jpg
- _id: 16
  word: egret
  translate: 白鷺
  tags: bird
  picture: c10/egret.jpg
- _id: 17
  word: elephant
  translate: 
  tags: mammal
  picture: c10/elephant.jpg
- _id: 18
  word: fish
  translate: 
  tags: otherAnimal
  picture: c10/fish.jpg
- _id: 19
  word: goat
  translate: 山羊
  tags: mammal
  picture: c10/goat.jpg
- _id: 20
  word: grasshopper
  translate: 蚱蜢
  tags: otherAnimal
  picture: c10/grasshopper.jpg
- _id: 21
  word: hawk
  translate: 
  tags: bird
  picture: c10/hawk.jpg
- _id: 22
  word: hen
  translate: 母雞
  tags: bird
  picture: c10/hen.jpg
- _id: 23
  word: hippopotamus
  translate: 河馬
  tags: mammal
  picture: c10/hippopotamus.jpg
- _id: 24
  word: horse
  translate: 
  tags: mammal
  picture: c10/horse.jpg
- _id: 25
  word: hyena
  translate: 鬣狗
  tags: mammal
  picture: c10/hyena.jpg
- _id: 26
  word: kingfisher
  translate: 翠鳥
  tags: bird
  picture: c10/kingfisher.jpg
- _id: 27
  word: lion
  translate: 獅子
  tags: mammal
  picture: c10/lion.jpg
- _id: 28
  word: lizard
  translate: 蜥蜴
  tags: otherAnimal
  picture: c10/lizard.jpg
- _id: 29
  word: monkey
  translate: 
  tags: mammal
  picture: c10/monkey.jpg
- _id: 30
  word: owl
  translate: 貓頭鷹
  tags: bird
  picture: c10/owl.jpg
- _id: 31
  word: parrot
  translate: 鸚鵡
  tags: bird
  picture: c10/parrot.jpg
- _id: 32
  word: pigeon
  translate: 鴿子
  tags: bird
  picture: c10/pigeon.jpg
- _id: 33
  word: rabbit
  translate: 兔子
  tags: mammal
  picture: c10/rabbit.jpg
- _id: 34
  word: scorpion
  translate: 
  tags: otherAnimal
  picture: c10/scorpion.jpg
- _id: 35
  word: sheep
  translate: 
  tags: mammal
  picture: c10/sheep.jpg
- _id: 36
  word: snake
  translate: 
  tags: otherAnimal
  picture: c10/snake.jpg
- _id: 37
  word: spider
  translate: 蜘蛛
  tags: otherAnimal
  picture: c10/spider.jpg
- _id: 38
  word: toad
  translate: 蟾蜍
  tags: otherAnimal
  picture: c10/toad.jpg
- _id: 39
  word: vulture
  translate: 禿鷲
  tags: bird
  picture: c10/vulture.jpg
- _id: 40
  word: warthog
  translate: 疣豬
  tags: mammal
  picture: c10/warthog.jpg

JSON

[
  {
    "_id": 1,
    "word": "antelope",
    "translate": "羚羊",
    "tags": "mammal",
    "picture": "c10/antelope.jpg"
  },
  {
    "_id": 2,
    "word": "ant",
    "translate": "螞蟻",
    "tags": "otherAnimal",
    "picture": "c10/ant.jpg"
  },
  {
    "_id": 3,
    "word": "baboon",
    "translate": "狒狒",
    "tags": "mammal",
    "picture": "c10/baboon.jpg"
  },
  {
    "_id": 4,
    "word": "bat",
    "translate": "蝙蝠",
    "tags": "mammal",
    "picture": "c10/bat.jpg"
  },
  {
    "_id": 5,
    "word": "butterfly",
    "translate": "蝴蝶",
    "tags": "otherAnimal",
    "picture": "c10/butterfly.jpg"
  },
  {
    "_id": 6,
    "word": "calf",
    "translate": "小牛",
    "tags": "mammal",
    "picture": "c10/calf.jpg"
  },
  {
    "_id": 7,
    "word": "camel",
    "translate": "駱駝",
    "tags": "mammal",
    "picture": "c10/camel.jpg"
  },
  {
    "_id": 8,
    "word": "cat",
    "translate": "",
    "tags": "mammal",
    "picture": "c10/cat.jpg"
  },
  {
    "_id": 9,
    "word": "chameleon",
    "translate": "變色龍",
    "tags": "otherAnimal",
    "picture": "c10/chameleon.jpg"
  },
  {
    "_id": 10,
    "word": "coucal",
    "translate": "褐翅鴉鵑",
    "tags": "bird",
    "picture": "c10/coucal_bird.jpg"
  },
  {
    "_id": 11,
    "word": "crocodile",
    "translate": "鱷魚",
    "tags": "otherAnimal",
    "picture": "c10/crocodile.jpg"
  },
  {
    "_id": 12,
    "word": "dog",
    "translate": "",
    "tags": "mammal",
    "picture": "c10/dog.jpg"
  },
  {
    "_id": 13,
    "word": "donkey",
    "translate": "",
    "tags": "mammal",
    "picture": "c10/donkey.jpg"
  },
  {
    "_id": 14,
    "word": "duck",
    "translate": "",
    "tags": "bird",
    "picture": "c10/duck.jpg"
  },
  {
    "_id": 15,
    "word": "eagle",
    "translate": "",
    "tags": "bird",
    "picture": "c10/eagle.jpg"
  },
  {
    "_id": 16,
    "word": "egret",
    "translate": "白鷺",
    "tags": "bird",
    "picture": "c10/egret.jpg"
  },
  {
    "_id": 17,
    "word": "elephant",
    "translate": "",
    "tags": "mammal",
    "picture": "c10/elephant.jpg"
  },
  {
    "_id": 18,
    "word": "fish",
    "translate": "",
    "tags": "otherAnimal",
    "picture": "c10/fish.jpg"
  },
  {
    "_id": 19,
    "word": "goat",
    "translate": "山羊",
    "tags": "mammal",
    "picture": "c10/goat.jpg"
  },
  {
    "_id": 20,
    "word": "grasshopper",
    "translate": "蚱蜢",
    "tags": "otherAnimal",
    "picture": "c10/grasshopper.jpg"
  },
  {
    "_id": 21,
    "word": "hawk",
    "translate": "",
    "tags": "bird",
    "picture": "c10/hawk.jpg"
  },
  {
    "_id": 22,
    "word": "hen",
    "translate": "母雞",
    "tags": "bird",
    "picture": "c10/hen.jpg"
  },
  {
    "_id": 23,
    "word": "hippopotamus",
    "translate": "河馬",
    "tags": "mammal",
    "picture": "c10/hippopotamus.jpg"
  },
  {
    "_id": 24,
    "word": "horse",
    "translate": "",
    "tags": "mammal",
    "picture": "c10/horse.jpg"
  },
  {
    "_id": 25,
    "word": "hyena",
    "translate": "鬣狗",
    "tags": "mammal",
    "picture": "c10/hyena.jpg"
  },
  {
    "_id": 26,
    "word": "kingfisher",
    "translate": "翠鳥",
    "tags": "bird",
    "picture": "c10/kingfisher.jpg"
  },
  {
    "_id": 27,
    "word": "lion",
    "translate": "獅子",
    "tags": "mammal",
    "picture": "c10/lion.jpg"
  },
  {
    "_id": 28,
    "word": "lizard",
    "translate": "蜥蜴",
    "tags": "otherAnimal",
    "picture": "c10/lizard.jpg"
  },
  {
    "_id": 29,
    "word": "monkey",
    "translate": "",
    "tags": "mammal",
    "picture": "c10/monkey.jpg"
  },
  {
    "_id": 30,
    "word": "owl",
    "translate": "貓頭鷹",
    "tags": "bird",
    "picture": "c10/owl.jpg"
  },
  {
    "_id": 31,
    "word": "parrot",
    "translate": "鸚鵡",
    "tags": "bird",
    "picture": "c10/parrot.jpg"
  },
  {
    "_id": 32,
    "word": "pigeon",
    "translate": "鴿子",
    "tags": "bird",
    "picture": "c10/pigeon.jpg"
  },
  {
    "_id": 33,
    "word": "rabbit",
    "translate": "兔子",
    "tags": "mammal",
    "picture": "c10/rabbit.jpg"
  },
  {
    "_id": 34,
    "word": "scorpion",
    "translate": "",
    "tags": "otherAnimal",
    "picture": "c10/scorpion.jpg"
  },
  {
    "_id": 35,
    "word": "sheep",
    "translate": "",
    "tags": "mammal",
    "picture": "c10/sheep.jpg"
  },
  {
    "_id": 36,
    "word": "snake",
    "translate": "",
    "tags": "otherAnimal",
    "picture": "c10/snake.jpg"
  },
  {
    "_id": 37,
    "word": "spider",
    "translate": "蜘蛛",
    "tags": "otherAnimal",
    "picture": "c10/spider.jpg"
  },
  {
    "_id": 38,
    "word": "toad",
    "translate": "蟾蜍",
    "tags": "otherAnimal",
    "picture": "c10/toad.jpg"
  },
  {
    "_id": 39,
    "word": "vulture",
    "translate": "禿鷲",
    "tags": "bird",
    "picture": "c10/vulture.jpg"
  },
  {
    "_id": 40,
    "word": "warthog",
    "translate": "疣豬",
    "tags": "mammal",
    "picture": "c10/warthog.jpg"
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant