Example #1
0
        RelatedConcepts Process()
        {
            for (int i = 0; i < Context.GetLength(1); i++)
            {
                var res = GetExtentByIntent(i);
                if (res.Length > 1)
                {
                    FindRecurse(res, i);
                    break;
                }
            }
            RelatedConcepts concepts = new RelatedConcepts();

            foreach (var formalContext in FormalContext)
            {
                List <InternalObject> objects = formalContext.Key.Select(value =>
                {
                    return(new InternalObject()
                    {
                        Index = value, Name = _export.GetObjects()[value]
                    });
                }).ToList();
                List <InternalObject> attributes = formalContext.Value.Select(value => {
                    return(new InternalObject()
                    {
                        Index = value, Name = _export.GetAttributes()[value]
                    });
                }).ToList();
                concepts.Add(objects, attributes);
            }
            return(concepts);
        }