Example #1
0
        private static void DatabaseReadTest()
        {
            var repository    = new CosmosAutoTaggerStorage();
            var instagramTags = repository.FindHumanoidTags(new[] { "boot", "fisch", "egal" });

            Console.WriteLine("You should use the following instagram tags:");
            foreach (var tag in instagramTags)
            {
                Console.WriteLine(tag);
            }
        }
Example #2
0
        private static void DatabaseInsertTest()
        {
            // Console.WriteLine("Database Test");
            // var db = new CosmosGraphDatabase();
            // var result = db.Submit("g.V()");
            var repository = new CosmosAutoTaggerStorage();

            //context.Drop();

            repository.InsertOrUpdate("schiff1", new[] { "boot", "wasser" }, new[] { "urlaub", "entspannung" });

            repository.InsertOrUpdate("boot1", new[] { "boot", "fisch" }, new[] { "urlaub", "angeln" });

            Console.WriteLine("Graph reset and filled.s");
        }
Example #3
0
        public static void ImportInstagramTags()
        {
            var linkWithTags = File.ReadLines("./imageLinks.txt").ToList();

            foreach (var linkWithTag in linkWithTags)
            {
                var splitted     = linkWithTag.Split(',');
                var link         = splitted.First();
                var humanoidTags = splitted.Skip(1).First().Split('/');

                var tagger     = new ClarifaiImageTagger();
                var repository = new CosmosAutoTaggerStorage();

                var machineTags = tagger.GetTagsForImageUrl(link);

                repository.InsertOrUpdate(link, machineTags, humanoidTags);
            }
        }