Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

175
Visualizações
Storing 'Ner' object in Mongodb

I am trying to store a 'js' object in Mongodb collection. This is a 'Ner' object to extract custom entities from a sentence:

  container: Container {
    classes: {},
    factory: {
      logger: [Object],
      fs: [Object],
      arrToObj: [Object],
      normalize: [Object],
      objToArr: [Object],
      stem: [Object],
      removeStopwords: [Object],
      tokenize: [Object],
      timer: [Object],
      storage: [Object],
      'extract-enum': [Object],
      'extract-regex': [Object],
      'extract-trim': [Object],
      'extract-builtin': [Object]
    },
    pipelines: {},
    configurations: {},
    compilers: { default: [DefaultCompiler] },
    cache: { bestKeys: {}, pipelines: [Object] },
    parent: undefined
  },
  settings: {
    container: Container {
      classes: {},
      factory: [Object],
      pipelines: {},
      configurations: {},
      compilers: [Object],
      cache: [Object],
      parent: undefined
    },
    tag: 'ner'
  },
  rules: { en: { hero: [Object] } },
  pipelineProcess: undefined
}

I want to store this in a collection in Mongodb. The problem is, this object cannot be directly stored because it results in a cycle detection error therefore I need to convert it to JSON first, but stringifying it results in {"settings":{"tag":"ner"},"rules":{"en":{"hero":{"name":"hero","type":"enum","rules":[{"option":"spiderman","texts":["spiderman","spider-man","Peter Parker"]}]}}}} which is incomplete and it cannot be parsed back to it's original form. Is there any way to store the object in it's original form in the db to avoid all the issues.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda