コード例 #1
0
        private static void Main(string[] args)
        {
            Console.WriteLine($"Start {DateTime.Now}");

            const string activeUsers =
                @"E:\uni\Cluster and Cloud Computing\assign2\TwitterExplore\Extracts\FilteredExtract\data\twitter-extract-all.json";
            const string tgtFile = @"..\..\twitter-all-geotagged-posters.json";
            var          tgtLocs = new List <string> {
                @"A:\twitter"
            };



            var geoPosts = new JsonRead <TagPosterDetails>(new[] { activeUsers });

            geoPosts.DoLoad();

            // extract unique userIds
            var ids = new HashSet <string>(geoPosts.Records.Select(x => x.UserIdStr));

            Console.WriteLine($"Have {ids.Count} posters\n");

            var jr = new FilterJsonRead(tgtLocs, geoPosts.Records.Count, ids);

            jr.ExtractAndSave(tgtFile);

            Console.WriteLine($"Done {DateTime.Now}");
        }
コード例 #2
0
        private FilterJsonRead(FilterJsonRead src)
        {
            Ids     = src.Ids;
            Records = new List <TagPosterDetails>(10000);

            _ser = new DataContractJsonSerializer(typeof(UniTwitterRow));
            _re  = new Regex(Filter, RegexOptions.Compiled);
        }