{"size": 1543, "ext": "js", "max_stars_repo_path": "src/patterns/haiyouPattern.js", "max_stars_repo_name": "texh/cn-grammar-matcher", "max_stars_repo_stars_event_min_datetime": "2018-03-30T06:33:48.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-24T00:30:34.000Z", "max_issues_repo_path": "src/patterns/haiyouPattern.js", "max_issues_repo_name": "texh/cn-grammar-matcher", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/patterns/haiyouPattern.js", "max_forks_repo_name": "texh/cn-grammar-matcher", "max_forks_repo_forks_event_min_datetime": "2018-08-31T21:15:40.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-17T09:29:31.000Z"}
{"max_stars_count": 19, "max_issues_count": null, "max_forks_count": 6, "avg_line_length": 37.6341463415, "max_line_length": 344, "alphanum_fraction": 0.6234607907}
/* --- AUTOGENERATED FILE -----------------------------
* If you make changes to this file delete this comment.
* Otherwise the file may be overwritten in the future.
* --------------------------------------------------- */

const { mergeLocMatchGroups } = require('../lib/matching/utils');
const { regexMatchLocs } = require('../lib/matching/regexMatch');

const allSetSrc = {
  type: 'website',
  url: 'https://resources.allsetlearning.com/chinese/grammar/ASGHQRI1',
  name: 'AllSet Chinese Grammar Wiki',
};

module.exports = {
  id: 'haiyou',
  structures: ['[Clause ]，+  还有 ，+ [Clause 2]'],
  description:
    '"还有" (háiyǒu) is used to express "in addition..." or "and also..." in a conversation. It is introducing new information to the topic the speaker is talking about, as an afterthought. While it\'s not the most challenging grammar structure, an important thing to keep in mind is that 还有 normally starts a completely new sentence or clause.',
  sources: [allSetSrc],
  match: sentence => mergeLocMatchGroups([regexMatchLocs(sentence.text, /(还有)/)]),
  examples: [
    {
      zh: '你需要吃点药。还有，要多休息。',
      en: 'You need to take some medicine. Also, you should get more rest.',
      src: allSetSrc,
    },
    {
      zh: '你跟他一起去吧。还有，别忘了带这些材料。',
      en: "Please go with him. Also, don't forget to bring these materials.",
      src: allSetSrc,
    },
    {
      zh: '我今天要考试。还有，我必须要写完中文作文。',
      en:
        'I’m going to have an exam today. Plus, I must finish writing my Chinese essay.',
      src: allSetSrc,
    },
  ],
};
