Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

186
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda